diff --git a/pkgs/racket-test/tests/racket/contract/random-generate.rkt b/pkgs/racket-test/tests/racket/contract/random-generate.rkt index 3ab888a1f3..8d8042dab6 100644 --- a/pkgs/racket-test/tests/racket/contract/random-generate.rkt +++ b/pkgs/racket-test/tests/racket/contract/random-generate.rkt @@ -59,8 +59,10 @@ (check-not-exn (λ () (test-contract-generation (<=/c 0.0)))) (check-not-exn (λ () (test-contract-generation (>/c 0)))) (check-not-exn (λ () (test-contract-generation (>/c 0.0)))) +(check-not-exn (λ () (test-contract-generation (>/c -inf.0)))) (check-not-exn (λ () (test-contract-generation (-ctc-x ctc)) - (λ (fuel) - (λ () - (rand-choice - [1/10 (-/+ +inf.0)] - [1/10 (-/+ x 0.01)] - [4/10 (-/+ x (random))] - [else (-/+ x (random 4294967087))])))) + (cond + [(and (= x +inf.0) (equal? name '/c)) + (λ (fuel) #f)] + [(and (= x -inf.0) (equal? name '>/c)) + (λ (fuel) + (λ () + (rand-choice + [1/10 +inf.0] + [2/10 (random)] + [2/10 (- (random))] + [2/10 (random 4294967087)] + [2/10 (- (random 4294967087))] + [else 0])))] + [else + (λ (fuel) + (λ () + (rand-choice + [1/10 (-/+ +inf.0)] + [1/10 (-/+ x 0.01)] + [4/10 (-/+ x (random))] + [else (-/+ x (random 4294967087))])))])) #:stronger -ctc-stronger #:equivalent -ctc-equivalent))