From 913ef6a2ef6d4d32ec15e11a84c96334d30e91ec Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Thu, 1 Oct 2015 13:30:51 -0500 Subject: [PATCH] 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. --- typed-racket-test/tr-random-testing.rkt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/typed-racket-test/tr-random-testing.rkt b/typed-racket-test/tr-random-testing.rkt index 7e5a00b8..013d8a41 100644 --- a/typed-racket-test/tr-random-testing.rkt +++ b/typed-racket-test/tr-random-testing.rkt @@ -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)))