Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge pull request #43 from zkessin/num_tests
add module/2 to allow a variable number of tests
  • Loading branch information
krestenkrab committed Jan 8, 2015
2 parents 53af6ea + 2b6b872 commit 2fe1529bc1460e0a8cd356ef7a8fda9e43120445
Showing 1 changed file with 5 additions and 1 deletion.
@@ -36,6 +36,7 @@
check/3,
fails/1,
module/1,
module/2,
counterexample/0,
counterexample/1,
numtests/2]).
@@ -283,12 +284,15 @@ all(Fun,[H|T]) ->
%% @end
%%--------------------------------------------------------------------
module(Module) when is_atom(Module) ->
module(Module, 100).

module(Module, RunIters) when is_integer(RunIters), RunIters>0 ->
Info = Module:module_info(exports),
all(fun({Fun,0}) ->
case atom_to_list(Fun) of
"prop_" ++ _ ->
io:format("Testing ~p:~p/0~n", [Module, Fun]),
check(Module:Fun());
check(Module:Fun(), RunIters);
_ -> true
end;
({_,_}) -> true

0 comments on commit 2fe1529

Please sign in to comment.