TR: Added some syntax and set tests.

This commit is contained in:
Eric Dobson 2011-06-20 15:03:12 -04:00 committed by Sam Tobin-Hochstadt
parent f5517367e5
commit f5a7e73be8
2 changed files with 21 additions and 1 deletions

View File

@ -1165,8 +1165,28 @@
(tc-e (make-lock-file-name "tmp.dir" "tmp.file") -Pathlike)
;New set operations
(tc-e (set-union (set 'one) (set 'two)) (-set (one-of/c 'one 'two)))
(tc-e (set-intersect (set 'one) (set 'two)) (-set (-val 'one)))
(tc-e (set-subtract (set 'one) (set 'two)) (-set (-val 'one)))
(tc-e (set-symmetric-difference (set 'one) (set 'two)) (-set (one-of/c 'one 'two)))
(tc-e (list->set (list 'one 'two)) (-set (one-of/c 'one 'two)))
(tc-e (list->seteq (list 'one 'two)) (-set (one-of/c 'one 'two)))
(tc-e (list->seteqv (list 'one 'two)) (-set (one-of/c 'one 'two)))
(tc-e (set->list (set 'one 'two)) (-lst (one-of/c 'one 'two)))
;Syntax
(tc-e (syntax? #'id) #:ret (ret B (-FS -top -bot)))
(tc-e (syntax? 2) #:ret (ret B (-FS -bot -top)))
(tc-e (syntax-source #'here) Univ)
(tc-e (syntax-line #'here) (-opt -PosInt))
(tc-e (syntax-column #'here) (-opt -Nat))
(tc-e (syntax-position #'here) (-opt -PosInt))
(tc-e (syntax-span #'here) (-opt -Nat))

View File

@ -993,7 +993,7 @@
[set-union (-poly (e) (->* (list (-set e)) (-set e) (-set e)))]
[set-intersect (-poly (a b) (->* (list (-set a)) (-set b) (-set a)))]
[set-subtract (-poly (a b) (->* (list (-set a)) (-set b) (-set a)))]
[set-symmetric-difference (-poly (a b) (->* (list (-set a)) (-set b) (-set a)))]
[set-symmetric-difference (-poly (e) (->* (list (-set e)) (-set e) (-set e)))]
[set=? (-poly (a b) (-> (-set a) (-set b) B))]