Skip to content

Commit

Permalink
Update EQC tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Licenser committed Apr 24, 2017
1 parent 79c5ceb commit fc33fd6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
13 changes: 4 additions & 9 deletions test/dhcp_eqc.erl → eqc/dhcp_eqc.erl
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
-module(dhcp_eqc).

-define(M, dhcp).
-compile(export_all).

-ifdef(TEST).
-ifdef(EQC).
-include_lib("fqc/include/fqc.hrl").
-include_lib("eqc/include/eqc.hrl").
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
-include_lib("dhcp/include/dhcp.hrl").

-include("dhcp.hrl").
-define(M, dhcp).

byte() ->
choose(0,255).
Expand All @@ -22,6 +20,3 @@ prop_ip_tpl_conversion() ->
EncDecTpl = ?M:ip_to_tpl(?M:tpl_to_ip(Tpl)),
EncDecTpl =:= Tpl
end).

-endif.
-endif.
14 changes: 5 additions & 9 deletions test/dhcp_package_eqc.erl → eqc/dhcp_package_eqc.erl
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
-module(dhcp_package_eqc).

-define(M, dhcp_package).
-compile(export_all).

-ifdef(TEST).
-ifdef(EQC).
-include_lib("fqc/include/fqc.hrl").
-include_lib("eqc/include/eqc.hrl").
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
-include_lib("dhcp/include/dhcp.hrl").

-define(M, dhcp_package).

-include("dhcp.hrl").

%%%===================================================================
%%% Generators
Expand Down Expand Up @@ -135,6 +134,3 @@ prop_string_conversion() ->
%% {ok, EncDecP} = decode(EncP),
%% EncDecP =:= PMt1
%% end).

-endif.
-endif.
3 changes: 1 addition & 2 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{lib_dirs, ["deps"]}.
{erl_opts, [
{parse_transform, lager_transform}, debug_info, warnings_as_errors,
{platform_define, "(?=^[0-9]+)(?!^17$)", time_correction}
Expand All @@ -11,4 +10,4 @@
{profiles,
[{lint, [{plugins, [rebar3_lint]}]},
{shell, [{deps, [sync]}]},
{eqc, [{deps, [meck]}, {plugins, [rebar_eqc]}]}]}.
{eqc, [{erl_opts, [{d, 'TEST'}]}, {deps, [meck]}, {plugins, [rebar_eqc]}]}]}.

0 comments on commit fc33fd6

Please sign in to comment.