Skip to content

Commit

Permalink
surround QuickCheck code with ifdef(EQC)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinoski committed Apr 26, 2012
1 parent 84330da commit eff3252
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/dlcbf.erl
Expand Up @@ -29,8 +29,8 @@
in/2]).

-ifdef(TEST).
-ifdef(EQC).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([pos_int/0,
power_of_two/0,
prop_add_are_members/0,
Expand All @@ -40,6 +40,8 @@
apply_ops/3,
prop_add_delete/0]).
-endif.
-include_lib("eunit/include/eunit.hrl").
-endif.

-on_load(init/0).

Expand Down Expand Up @@ -101,6 +103,8 @@ basic_test() ->
?assertNot(in(<<"c">>, D)),
?assert(in(<<"b">>, D)).

-ifdef(EQC).

-define(QC_OUT(P),
eqc:on_output(fun(Str, Args) -> io:format(user, Str, Args) end, P)).

Expand Down Expand Up @@ -173,4 +177,6 @@ prop_add_delete_test_() ->
Prop = eqc:numtests(5000, dlcbf:prop_add_delete()),
{timeout, 2*60, fun() -> qc(Prop) end}.

-endif. % EQC

-endif.

0 comments on commit eff3252

Please sign in to comment.