fix mzlib tests for use-before-initialization
original commit: 1727e4dbfcc223d0230cd05e598b0863f69395a8
This commit is contained in:
parent
faa3058442
commit
a67c0c7250
|
@ -4178,8 +4178,8 @@ so that propagation occurs.
|
||||||
(test-name 'printable/c printable/c)
|
(test-name 'printable/c printable/c)
|
||||||
(test-name '(or/c 'a 'b 'c) (symbols 'a 'b 'c))
|
(test-name '(or/c 'a 'b 'c) (symbols 'a 'b 'c))
|
||||||
(test-name '(or/c 1 2 3) (one-of/c 1 2 3))
|
(test-name '(or/c 1 2 3) (one-of/c 1 2 3))
|
||||||
(test-name '(or/c '() 'x 1 #f #\a void? undefined?)
|
(test-name '(or/c '() 'x 1 #f #\a void?)
|
||||||
(one-of/c '() 'x 1 #f #\a (void) (letrec ([x x]) x)))
|
(one-of/c '() 'x 1 #f #\a (void)))
|
||||||
|
|
||||||
(test-name '(subclass?/c c%)
|
(test-name '(subclass?/c c%)
|
||||||
(let ([c% (class object% (super-new))]) (subclass?/c c%)))
|
(let ([c% (class object% (super-new))]) (subclass?/c c%)))
|
||||||
|
|
|
@ -5,24 +5,24 @@
|
||||||
|
|
||||||
(require mzlib/etc)
|
(require mzlib/etc)
|
||||||
|
|
||||||
(let ([u (letrec ([x x]) x)])
|
(err/rt-test (let+ ([rec a a]) 5) exn:fail:contract:variable?)
|
||||||
(let ([l1
|
(err/rt-test (let+ ([recs [b c] [c b]]) 5) exn:fail:contract:variable?)
|
||||||
(let+ ([rec a a]
|
|
||||||
[recs [b c] [c b]]
|
(let ([l1
|
||||||
[rec d 1]
|
(let+ ([rec d 1]
|
||||||
[val e 1]
|
[val e 1]
|
||||||
[val x 1]
|
[val x 1]
|
||||||
[val y 2]
|
[val y 2]
|
||||||
[vals (x y) (y x)]
|
[vals (x y) (y x)]
|
||||||
[rec (values f) (values 1)]
|
[rec (values f) (values 1)]
|
||||||
[vals [(values g h) (values 2 3)]]
|
[vals [(values g h) (values 2 3)]]
|
||||||
[val i 3]
|
[val i 3]
|
||||||
[_ (set! i 4)
|
[_ (set! i 4)
|
||||||
(set! i 5)])
|
(set! i 5)])
|
||||||
'x
|
'x
|
||||||
(list a b c d e x y f g h i))]
|
(list d e x y f g h i))]
|
||||||
[l2 (list u u u 1 1 2 1 1 2 3 5)])
|
[l2 (list 1 1 2 1 1 2 3 5)])
|
||||||
(test l1 'let-plus l2)))
|
(test l1 'let-plus l2))
|
||||||
|
|
||||||
(test 'hi 'local (local () 'hi))
|
(test 'hi 'local (local () 'hi))
|
||||||
(define x 7)
|
(define x 7)
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
(require mzlib/unit200)
|
(require mzlib/unit200)
|
||||||
(require mzlib/unitsig200)
|
(require mzlib/unitsig200)
|
||||||
(require mzlib/include)
|
(require mzlib/include)
|
||||||
|
(require racket/undefined)
|
||||||
|
|
||||||
(Section 'unit/sig)
|
(Section 'unit/sig)
|
||||||
|
|
||||||
|
@ -127,7 +128,7 @@
|
||||||
; Self-import is now allowed
|
; Self-import is now allowed
|
||||||
; (syntax-test #'(compound-unit/sig (import) (link (A : () (0 A))) (export))) ; self-import
|
; (syntax-test #'(compound-unit/sig (import) (link (A : () (0 A))) (export))) ; self-import
|
||||||
; (syntax-test #'(compound-unit/sig (import) (link (A : (x) (0 A))) (export))) ; self-import
|
; (syntax-test #'(compound-unit/sig (import) (link (A : (x) (0 A))) (export))) ; self-import
|
||||||
(test (list (letrec ([x x]) x) 5)
|
(test (list undefined 5)
|
||||||
'self-import
|
'self-import
|
||||||
(invoke-unit/sig
|
(invoke-unit/sig
|
||||||
(compound-unit/sig
|
(compound-unit/sig
|
||||||
|
|
Loading…
Reference in New Issue
Block a user