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:
parent
0fc84c6fba
commit
f060e3a47c
|
@ -1678,14 +1678,42 @@ of the contract library does not change over time.
|
|||
(test/spec-failed
|
||||
'define/contract13
|
||||
'(begin
|
||||
(eval '(module foo scheme/base
|
||||
(require scheme/contract)
|
||||
(define/contract (foo n)
|
||||
(eval '(module foo-dc13 mzscheme
|
||||
(require mzlib/contract)
|
||||
(define/contract (foo-dc13 n)
|
||||
(-> number? number?)
|
||||
(+ n 1))
|
||||
(foo #t)))
|
||||
(eval '(require 'foo)))
|
||||
"module foo")
|
||||
(foo-dc13 #t)))
|
||||
(eval '(require 'foo-dc13)))
|
||||
"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
|
||||
'with-contract1
|
||||
|
|
Loading…
Reference in New Issue
Block a user