From 8dc48c88d59c3cbd0d935431f2007b2df0dd7dd7 Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Fri, 18 May 2018 09:08:05 +0200 Subject: [PATCH] test with non-fixed seed + test ?TRAPEXIT/1 --- test/proper_tests.erl | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/test/proper_tests.erl b/test/proper_tests.erl index 85db5e14..272a7892 100644 --- a/test/proper_tests.erl +++ b/test/proper_tests.erl @@ -1041,24 +1041,19 @@ options_test_() -> [{start_size,12}])]. seeded_test_() -> - Seed = {1526,530081,919799}, + Seed = os:timestamp(), Opts = [{seed,Seed}, noshrink, {start_size,65536}], QC = fun (Prop) -> - R = proper:quickcheck(Prop,Opts), + R = proper:quickcheck(Prop, Opts), proper:clean_garbage(), R end, - Prop = ?FORALL(_,integer(),false), - Check = QC(Prop), - IsClean = state_is_clean(), - PropSA = ?FORALL_TARGETED(I,integer(), begin ?MAXIMIZE(I),false end), - CheckSA = QC(PropSA), - IsCleanSA = state_is_clean(), - [?_assert(IsClean) - ,?_assertEqual(QC(Prop), Check) - ,?_assert(IsCleanSA) - ,?_assertEqual(QC(PropSA), CheckSA) - %% ,?_assertEqual(Check(PropSA), Check(Prop)) + [[?_assert(state_is_clean()), ?_assertEqual(QC(Prop),Check)] + || Prop <- [?FORALL(_, integer(), false) + ,?FORALL(_, integer(), ?TRAPEXIT(false)) + ,?FORALL_TARGETED(I, integer(), begin ?MAXIMIZE(I),false end) + ], + Check <- [QC(Prop)] ]. setup_prop() ->