diff --git a/collects/tests/typed-scheme/main.rkt b/collects/tests/typed-scheme/main.rkt index a9c97b8a79..41edab6848 100644 --- a/collects/tests/typed-scheme/main.rkt +++ b/collects/tests/typed-scheme/main.rkt @@ -86,8 +86,8 @@ (test-suite "Typed Scheme Tests" unit-tests int-tests)) -(define (go) (test/gui tests)) -(define (go/text) (run-tests tests 'verbose)) +(define (go [unit? #f]) (test/gui (if unit? unit-tests tests))) +(define (go/text [unit? #f]) (run-tests (if unit? unit-tests tests) 'verbose)) (provide go go/text) diff --git a/collects/tests/typed-scheme/run.rkt b/collects/tests/typed-scheme/run.rkt index d892dd3466..993c6d1425 100644 --- a/collects/tests/typed-scheme/run.rkt +++ b/collects/tests/typed-scheme/run.rkt @@ -2,5 +2,5 @@ (require "main.ss") (current-namespace (make-base-namespace)) -(unless (= 0 (go/text)) +(unless (= 0 (go/text (member "unit" (vector->list (current-command-line-arguments))))) (error "Typed Scheme Tests did not pass.")) diff --git a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt index ca86558640..82c5b3cb98 100644 --- a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt @@ -799,14 +799,17 @@ (define: foo : (Integer * -> Integer) +) (foo 1 2 3 4 5)) -Integer] + [tc-e (let () + (define: x : Any 7) + (if (box? x) (unbox x) 1)) + Univ] ) (test-suite "check-type tests" (test-exn "Fails correctly" exn:fail:syntax? (lambda () (parameterize ([orig-module-stx #'here]) (check-type #'here N B)))) (test-not-exn "Doesn't fail on subtypes" (lambda () (check-type #'here N Univ))) - (test-not-exn "Doesn't fail on equal types" (lambda () (check-type #'here N N))) - ) + (test-not-exn "Doesn't fail on equal types" (lambda () (check-type #'here N N)))) (test-suite "tc-literal tests" (tc-l 5 -ExactPositiveInteger) @@ -820,7 +823,8 @@ (tc-l #f (-val #f)) (tc-l #"foo" -Bytes) [tc-l () (-val null)] - ) + [tc-l (3 . 4) (-pair -Pos -Pos)] + [tc-l #hash((1 . 2) (3 . 4)) (make-Hashtable -Pos -Pos)]) ))