test-generative pasted by certainty on Sun Mar 23 16:43:27 2014
(use data-generators test test-generative) ;; a generator is just a thunk so you're not bound to data-generators. You can ;; implement your own generators easily. ;; Incidently a generator in data-generator is just a thunk so it matches nicely (test-group "group around" (test-group "probably failing" (test-generative ((number (gen-fixnum)) (string (gen-string-of (gen-char #\a #\z)))) (test-assert (> (string-length string) 30)) (test-assert ((constantly #t))))) (test-group "all passing" (test-generative ((number (gen-fixnum))) (test-assert (number? number))))) (test-exit)
test-generative output added by certainty on Sun Mar 23 16:43:56 2014
-- testing group around ------------------------------------------------------ -- testing probably failing ---------------------------------------------- (> (string-length string) 30) .................................... [ FAIL] assertion failed iteration: 9 seeds: (62714213 "d") ((constantly #t)) ................................................ [ PASS] 2 tests completed in 0.004 seconds. 1 failure (50.0%). 1 out of 2 (50.0%) test passed. -- done testing probably failing ----------------------------------------- -- testing all passing --------------------------------------------------- (number? number) ................................................. [ PASS] 1 test completed in 0.002 seconds. 1 out of 1 (100%) test passed. -- done testing all passing ---------------------------------------------- 2 subgroups completed in 0.007 seconds. 1 out of 2 (50.0%) subgroup passed. -- done testing group around -------------------------------------------------