From ab80f989438f4ef2a2b8a35079a2e97d12ed922d Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 22 Mar 2006 15:22:09 +0000 Subject: [PATCH] added another contract-greater test svn: r2483 --- collects/tests/mzscheme/contract-test.ss | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/collects/tests/mzscheme/contract-test.ss b/collects/tests/mzscheme/contract-test.ss index da0959b58a..6bf98efd62 100644 --- a/collects/tests/mzscheme/contract-test.ss +++ b/collects/tests/mzscheme/contract-test.ss @@ -3915,6 +3915,13 @@ [tl (hd) (or/c null? (couple/c (<=/c hd) 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 #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))) @@ -3923,7 +3930,9 @@ (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 #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)