Fixing contract formatting change

This commit is contained in:
Jay McCarthy 2011-01-07 19:49:31 -07:00
parent d4e3d42d19
commit f2a9aebba5

View File

@ -32,10 +32,10 @@
(eli:test
(i 4)
(regexp-match "\\(exception \\(make-i #f\\) \".+/collects/tests/plai/datatype\\.rkt:13\\.3: use broke the contract \\(-> number\\? i\\?\\) on make-i given to \\\\n \\(file\\\\n .+/collects/tests/plai/datatype\\.rkt\\)\\\\n; expected <number\\?>, given: #f\" '<no-expected-value> \"at line 36\"\\)"
(regexp-match "\\(exception \\(make-i #f\\) \".+ on make-i .+\" '<no-expected-value> \"at line 36\"\\)"
(with-output-to-string (λ () (test/exn (make-i #f) "contract"))))
(regexp-match "\\(exception \\(i-f #f\\) \".+/collects/tests/plai/datatype\\.rkt:13\\.6: use broke the contract \\(-> i\\? number\\?\\) on i-f given to \\\\n \\(file\\\\n .+/collects/tests/plai/datatype\\.rkt\\)\\\\n; expected <i\\?>, given: #f\" '<no-expected-value> \"at line 39\"\\)"
(regexp-match "\\(exception \\(i-f #f\\) \".+ on i-f .+\" '<no-expected-value> \"at line 39\"\\)"
(with-output-to-string (λ () (test/exn (i-f #f) "contract"))))
@ -45,11 +45,16 @@
=>
1
(regexp-match "\\(exception \\(c1 \\(quote not-a-number\\)\\) \".+/collects/tests/plai/datatype\\.rkt:29\\.17: use broke the contract \\(-> number\\? c1\\?\\) on c1 given to \\\\n \\(file\\\\n .+/collects/tests/plai/datatype\\.rkt\\)\\\\n; expected <number\\?>, given: 'not-a-number\" '<no-expected-value> \"at line 49\"\\)"
(regexp-match "\\(exception \\(c1 \\(quote not-a-number\\)\\) \".+ on c1 .+\" '<no-expected-value> \"at line 49\"\\)"
(with-output-to-string (λ () (test (c1 'not-a-number) (list 5)))))
(regexp-match (regexp-quote "(exception (type-case t (list 1) (c () 1)) \"type-case: expected a value from type t, got: (1)\" '<no-expected-value> \"at line 53\")")
(with-output-to-string (λ ()
(test/exn
(type-case t (list 1) (c () 1))
"expected")))))
"expected"))))
(type-case "foo" "bar") =error> "this must be a type defined with define-type"
(type-case + "bar") =error> "this must be a type defined with define-type"
)