Add test for bug 10868
Add 'unit' command line arg to 'run.rkt' command to just run the unit tests
This commit is contained in:
parent
92a3085658
commit
34e64b650f
|
@ -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)
|
||||
|
||||
|
|
|
@ -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."))
|
||||
|
|
|
@ -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)])
|
||||
))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user