Add new test for force/delay.
Fix tests that have errors to have appropriate parameters. original commit: 717a81283582694de7508f6251e2d880da78d8cc
This commit is contained in:
parent
6cd98e19ef
commit
dbca8c34e4
9
collects/tests/typed-scheme/succeed/force-delay.ss
Normal file
9
collects/tests/typed-scheme/succeed/force-delay.ss
Normal file
|
@ -0,0 +1,9 @@
|
|||
#lang typed-scheme
|
||||
|
||||
(require scheme/promise)
|
||||
|
||||
;((plambda: (a) ([x : a]) x) (error 'foo))
|
||||
|
||||
(force (delay 3))
|
||||
|
||||
(call-with-values (lambda () 3) list)
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
(require string-constants/string-constant)
|
||||
|
||||
(string-constant cancel)
|
||||
(string-constant cancel)
|
||||
|
||||
(this-language)
|
|
@ -35,7 +35,8 @@
|
|||
(syntax-case stx ()
|
||||
[(_ e)
|
||||
#`(parameterize ([delay-errors? #f]
|
||||
[current-namespace (namespace-anchor->namespace anch)])
|
||||
[current-namespace (namespace-anchor->namespace anch)]
|
||||
[orig-module-stx (quote-syntax e)])
|
||||
(let ([ex (expand 'e)])
|
||||
(find-mutated-vars ex)
|
||||
(tc-expr ex)))]))
|
||||
|
@ -648,7 +649,8 @@
|
|||
))
|
||||
(test-suite
|
||||
"check-type tests"
|
||||
(test-exn "Fails correctly" exn:fail:syntax? (lambda () (check-type #'here N B)))
|
||||
(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)))
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user