parent
87a231b792
commit
6551cc00d6
|
@ -40,6 +40,7 @@
|
||||||
(test-flat-contract '(integer-in 0 10) 0 11)
|
(test-flat-contract '(integer-in 0 10) 0 11)
|
||||||
(test-flat-contract '(integer-in 0 10) 10 3/2)
|
(test-flat-contract '(integer-in 0 10) 10 3/2)
|
||||||
(test-flat-contract '(integer-in 0 10) 1 1.0)
|
(test-flat-contract '(integer-in 0 10) 1 1.0)
|
||||||
|
(test-flat-contract '(integer-in 1 1) 1 1.0)
|
||||||
(test-flat-contract '(real-in 1 10) 3/2 20)
|
(test-flat-contract '(real-in 1 10) 3/2 20)
|
||||||
(test-flat-contract '(string-len/c 3) "ab" "abc")
|
(test-flat-contract '(string-len/c 3) "ab" "abc")
|
||||||
(test-flat-contract 'natural-number/c 5 -1)
|
(test-flat-contract 'natural-number/c 5 -1)
|
||||||
|
|
|
@ -545,12 +545,7 @@
|
||||||
(define/final-prop (integer-in start end)
|
(define/final-prop (integer-in start end)
|
||||||
(check-two-args 'integer-in start end exact-integer? exact-integer?)
|
(check-two-args 'integer-in start end exact-integer? exact-integer?)
|
||||||
(if (= start end)
|
(if (= start end)
|
||||||
|
(and/c start exact?)
|
||||||
;; won't fail, but gets us a contract struct
|
|
||||||
;; something seems safer to always produce
|
|
||||||
;; from a contract operation
|
|
||||||
(coerce-contract 'integer-in start)
|
|
||||||
|
|
||||||
(integer-in-ctc start end)))
|
(integer-in-ctc start end)))
|
||||||
|
|
||||||
(define/final-prop (real-in start end)
|
(define/final-prop (real-in start end)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user