fix random generation environment usage
closes PR 14484
This commit is contained in:
parent
2e284cc783
commit
90053d7d40
|
@ -48,6 +48,9 @@
|
|||
(check-not-exn (λ () ((test-contract-generation (-> (-> integer? integer?) boolean?)) +)))
|
||||
(check-not-exn
|
||||
(λ () ((test-contract-generation (-> some-crazy-predicate? some-crazy-predicate?)) 11)))
|
||||
(check-not-exn
|
||||
(λ () (((test-contract-generation (-> (-> (>/c 10) (>/c 10))))) 11)))
|
||||
|
||||
|
||||
(define (cannot-generate-exn? x)
|
||||
(and (exn:fail? x)
|
||||
|
@ -102,3 +105,4 @@
|
|||
(check-exn cannot-generate-exn? (λ () (test-contract-generation
|
||||
(-> (listof some-crazy-predicate?)
|
||||
some-crazy-predicate?))))
|
||||
|
||||
|
|
|
@ -731,8 +731,8 @@
|
|||
(cond
|
||||
[(for/and ([rng-gen (in-list rngs-gens)])
|
||||
rng-gen)
|
||||
(define env (generate-env))
|
||||
(λ ()
|
||||
(define env (generate-env))
|
||||
(procedure-reduce-arity
|
||||
(λ args
|
||||
; stash the arguments for use by other generators
|
||||
|
|
Loading…
Reference in New Issue
Block a user