Skip to content

Commit 8dc48c8

Browse files
committed
test with non-fixed seed + test ?TRAPEXIT/1
1 parent 5532ffb commit 8dc48c8

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

test/proper_tests.erl

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,24 +1041,19 @@ options_test_() ->
10411041
[{start_size,12}])].
10421042

10431043
seeded_test_() ->
1044-
Seed = {1526,530081,919799},
1044+
Seed = os:timestamp(),
10451045
Opts = [{seed,Seed}, noshrink, {start_size,65536}],
10461046
QC = fun (Prop) ->
1047-
R = proper:quickcheck(Prop,Opts),
1047+
R = proper:quickcheck(Prop, Opts),
10481048
proper:clean_garbage(),
10491049
R
10501050
end,
1051-
Prop = ?FORALL(_,integer(),false),
1052-
Check = QC(Prop),
1053-
IsClean = state_is_clean(),
1054-
PropSA = ?FORALL_TARGETED(I,integer(), begin ?MAXIMIZE(I),false end),
1055-
CheckSA = QC(PropSA),
1056-
IsCleanSA = state_is_clean(),
1057-
[?_assert(IsClean)
1058-
,?_assertEqual(QC(Prop), Check)
1059-
,?_assert(IsCleanSA)
1060-
,?_assertEqual(QC(PropSA), CheckSA)
1061-
%% ,?_assertEqual(Check(PropSA), Check(Prop))
1051+
[[?_assert(state_is_clean()), ?_assertEqual(QC(Prop),Check)]
1052+
|| Prop <- [?FORALL(_, integer(), false)
1053+
,?FORALL(_, integer(), ?TRAPEXIT(false))
1054+
,?FORALL_TARGETED(I, integer(), begin ?MAXIMIZE(I),false end)
1055+
],
1056+
Check <- [QC(Prop)]
10621057
].
10631058

10641059
setup_prop() ->

0 commit comments

Comments
 (0)