updated tests

This commit is contained in:
Ryan Culpepper 2013-10-06 21:57:44 -04:00
parent c4ba293c7e
commit 80b3f33b67
2 changed files with 22 additions and 0 deletions

View File

@ -139,3 +139,17 @@
[(_ x y:id)
#:declare x id #:role "thing"
'b]))))
;; Expected more terms
(terx (1)
(a b)
#rx"expected more terms starting with any term$")
(terx (1)
(a b:id)
#rx"expected more terms starting with identifier$")
(terx (1)
(a (~describe "thing" b))
#rx"expected more terms starting with thing$")

View File

@ -534,3 +534,11 @@
(terx (x y) ((~describe #:opaque "an X" x:id) n:number)
#rx"expected number"
(not #rx"expected an X"))
;; from Eric Dobson (10/5/2013)
(test-case "optional/defaults checks delayed in stxclass def"
(let ()
(define-syntax-class blah
#:attributes (a)
[pattern ((~seq (~optional :one #:defaults [(a 'bar)])))])
(void)))