added another contract-greater test
svn: r2483
This commit is contained in:
parent
f21648204e
commit
ab80f98943
|
@ -3915,6 +3915,13 @@
|
||||||
[tl (hd) (or/c null?
|
[tl (hd) (or/c null?
|
||||||
(couple/c (<=/c hd)
|
(couple/c (<=/c hd)
|
||||||
any/c))])))
|
any/c))])))
|
||||||
|
|
||||||
|
(define (sorted-list/less-than n)
|
||||||
|
(or/c null?
|
||||||
|
(couple/dc
|
||||||
|
[hd (<=/c n)]
|
||||||
|
[tl (hd) (sorted-list/less-than hd)])))
|
||||||
|
|
||||||
(test #t contract-stronger? (couple/c any/c any/c) (couple/c any/c any/c))
|
(test #t contract-stronger? (couple/c any/c any/c) (couple/c any/c any/c))
|
||||||
(test #f contract-stronger? (couple/c (>=/c 2) (>=/c 3)) (couple/c (>=/c 4) (>=/c 5)))
|
(test #f contract-stronger? (couple/c (>=/c 2) (>=/c 3)) (couple/c (>=/c 4) (>=/c 5)))
|
||||||
(test #t contract-stronger? (couple/c (>=/c 4) (>=/c 5)) (couple/c (>=/c 2) (>=/c 3)))
|
(test #t contract-stronger? (couple/c (>=/c 4) (>=/c 5)) (couple/c (>=/c 2) (>=/c 3)))
|
||||||
|
@ -3923,7 +3930,9 @@
|
||||||
(test #t contract-stronger? (short-list/less-than 4) (short-list/less-than 5))
|
(test #t contract-stronger? (short-list/less-than 4) (short-list/less-than 5))
|
||||||
(test #f contract-stronger? (short-list/less-than 5) (short-list/less-than 4))
|
(test #f contract-stronger? (short-list/less-than 5) (short-list/less-than 4))
|
||||||
(test #t contract-stronger? (short-sorted-list/less-than 4) (short-sorted-list/less-than 5))
|
(test #t contract-stronger? (short-sorted-list/less-than 4) (short-sorted-list/less-than 5))
|
||||||
(test #f contract-stronger? (short-sorted-list/less-than 5) (short-sorted-list/less-than 4)))
|
(test #f contract-stronger? (short-sorted-list/less-than 5) (short-sorted-list/less-than 4))
|
||||||
|
(test #t contract-stronger? (sorted-list/less-than 4) (sorted-list/less-than 5))
|
||||||
|
(test #f contract-stronger? (sorted-list/less-than 5) (sorted-list/less-than 4)))
|
||||||
|
|
||||||
))
|
))
|
||||||
(report-errs)
|
(report-errs)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user