Ensure a minimum of actually random testing.

Previously, most of it was actually deterministic enumeration, which meant
repeating the same tests over and over again. We still want to run those,
if only to catch regressions, so now we run both enumeration and truly
random tests, separately.

This does mean that the set of tests being run for a given seed is not the
same as it used to, so old seeds won't give the same results as before.
This commit is contained in:
Vincent St-Amour 2015-10-01 13:30:51 -05:00
parent 435e733d66
commit 913ef6a2ef

View File

@ -239,7 +239,13 @@
(call-with-limits
#f max-mem
(lambda ()
(redex-check tr-arith E (check-all-reals (term E))
;; start with 1000 small, deterministic test cases, to catch regressions
(redex-check tr-arith E #:in-order (check-all-reals (term E))
#:attempts 1000
#:prepare exp->real-exp
#:keep-going? #t)
;; then switch to purely random to get different ones every run
(redex-check tr-arith E #:ad-hoc (check-all-reals (term E))
#:attempts n-attempts
#:prepare exp->real-exp
#:keep-going? #t)))