Skip to content

Commit

Permalink
Minor refactoring in a test
Browse files Browse the repository at this point in the history
  • Loading branch information
manopapad committed Mar 31, 2013
1 parent d78c031 commit a2dc97c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/proper_tests.erl
Expand Up @@ -1100,13 +1100,14 @@ dollar_only_cp_test_() ->

max_size_test() ->
%% issue a call to load the test module and ensure the test exists
true = lists:member({prop_identity,0}, perf_max_size:module_info(exports)),
?assert(lists:member({prop_identity,0},
perf_max_size:module_info(exports))),
%% run some tests with a small and a big max_size option
{Ts,true} = timer:tc(fun() -> max_size_test_aux(42) end),
{Tb,true} = timer:tc(fun() -> max_size_test_aux(16#ffffffff) end),
%% ensure that the test with the big max_size option does not take
%% much longer than the small one to complete
?assertEqual(true, 2*Ts >= Tb).
?assert(2*Ts >= Tb).

max_size_test_aux(Size) ->
proper:quickcheck(perf_max_size:prop_identity(), [5,{max_size,Size}]).
Expand Down

0 comments on commit a2dc97c

Please sign in to comment.