Couple more tests. Also, change things to mzscheme/mzlib. I really should

go put the old version of define/contract in mzlib/contract.ss, have it
not import with-contract or the new define/contract, and fix the unit tests
appropriately.

svn: r11708

original commit: 32f0b99f12588db11aeca3461f8e68c764884a08
This commit is contained in:
Stevie Strickland 2008-09-12 23:39:19 +00:00
parent 0fc84c6fba
commit f060e3a47c

View File

@ -1678,14 +1678,42 @@ of the contract library does not change over time.
(test/spec-failed (test/spec-failed
'define/contract13 'define/contract13
'(begin '(begin
(eval '(module foo scheme/base (eval '(module foo-dc13 mzscheme
(require scheme/contract) (require mzlib/contract)
(define/contract (foo n) (define/contract (foo-dc13 n)
(-> number? number?) (-> number? number?)
(+ n 1)) (+ n 1))
(foo #t))) (foo-dc13 #t)))
(eval '(require 'foo))) (eval '(require 'foo-dc13)))
"module foo") "module foo-dc13")
(test/spec-failed
'define/contract14
'(begin
(eval '(module foo-dc14 mzscheme
(require mzlib/contract)
(provide foo-dc14)
(define/contract (foo-dc14 n)
(-> number? number?)
(+ n 1))))
(eval '(module bar-dc14 mzscheme
(require 'foo-dc14)
(foo-dc14 #t)))
(eval '(require 'bar-dc14)))
"module bar-dc14")
(test/spec-failed
'define/contract15
'(begin
(eval '(module foo-dc15 mzscheme
(require mzlib/contract)
(provide foo-dc15)
(define/contract (foo-dc15 n)
(-> number? number?)
(+ n 1))))
(eval '(require 'foo-dc15))
(eval '(foo-dc15 #t)))
"the top level")
(test/spec-passed (test/spec-passed
'with-contract1 'with-contract1