Skip to content

Commit

Permalink
Update quickcheck properties to R20
Browse files Browse the repository at this point in the history
just making them compile without warnings, some fail
  • Loading branch information
Thomas Arts committed Mar 7, 2019
1 parent 9c9a76d commit 7d783fb
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion eqc/bg_manager_eqc.erl
Expand Up @@ -29,7 +29,7 @@
-define(QC_OUT(P),
eqc:on_output(fun(Str, Args) -> io:format(user, Str, Args) end, P)).

-compile(export_all).
-compile([export_all, nowarn_export_all]).

-type bg_eqc_type() :: atom().
-type bg_eqc_limit() :: non_neg_integer().
Expand Down
2 changes: 1 addition & 1 deletion eqc/bprops_eqc.erl
Expand Up @@ -35,7 +35,7 @@
-include_lib("eqc/include/eqc.hrl").
-include_lib("eqc/include/eqc_statem.hrl").

-compile(export_all).
-compile([export_all, nowarn_export_all]).

-type bucket_name() :: binary().
-type orddict() :: orddict:orddict().
Expand Down
2 changes: 1 addition & 1 deletion eqc/btypes_eqc.erl
Expand Up @@ -25,7 +25,7 @@
-include_lib("eqc/include/eqc_statem.hrl").
-include_lib("eunit/include/eunit.hrl").

-compile(export_all).
-compile([export_all, nowarn_export_all]).

-type type_name() :: binary().
-type type_active_status() :: boolean().
Expand Down
2 changes: 1 addition & 1 deletion eqc/core_vnode_eqc.erl
Expand Up @@ -28,7 +28,7 @@
-include_lib("eqc/include/eqc_fsm.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("include/riak_core_vnode.hrl").
-compile([export_all]).
-compile([export_all, nowarn_export_all]).

-define(POST_COND(PC, ErrTuple),
case PC of
Expand Down
2 changes: 1 addition & 1 deletion eqc/hashtree_eqc.erl
Expand Up @@ -42,7 +42,7 @@


-module(hashtree_eqc).
-compile([export_all]).
-compile([export_all, nowarn_export_all]).

-ifdef(TEST).
-ifdef(EQC).
Expand Down
2 changes: 1 addition & 1 deletion eqc/node_watcher_qc.erl
Expand Up @@ -27,7 +27,7 @@
-include_lib("eqc/include/eqc_statem.hrl").
-include_lib("eunit/include/eunit.hrl").

-compile(export_all).
-compile([export_all, nowarn_export_all]).

-record(state, { up_nodes = [],
services = [],
Expand Down
2 changes: 1 addition & 1 deletion eqc/vclock_qc.erl
Expand Up @@ -5,7 +5,7 @@
-include_lib("eqc/include/eqc.hrl").
-include_lib("eqc/include/eqc_statem.hrl").
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
-compile([export_all, nowarn_export_all]).

-define(ACTOR_IDS, [a,b,c,d,e]).
-define(QC_OUT(P),
Expand Down
2 changes: 1 addition & 1 deletion eqc/worker_pool_pulse.erl
Expand Up @@ -32,7 +32,7 @@
%% riak_core_vnode_worker behavior
-export([init_worker/3, handle_work/3]).
%% console debugging convenience
-compile(export_all).
-compile([export_all, nowarn_export_all]).

-ifdef(PULSE).
-include_lib("pulse/include/pulse.hrl").
Expand Down
6 changes: 3 additions & 3 deletions src/hashtree.erl
Expand Up @@ -157,7 +157,7 @@
-endif. % TEST

-ifdef(EQC).
-export([prop_correct/0]).
-export([prop_correct/0, prop_sha/0, prop_est/0]).
-include_lib("eqc/include/eqc.hrl").
-endif.

Expand Down Expand Up @@ -434,7 +434,7 @@ clear_buckets(State=#state{id=Id, ref=Ref}) ->
%% tree.
State#state{next_rebuild = full,
tree = dict:new()}.


-spec update_tree([integer()], hashtree()) -> hashtree().
update_tree([], State) ->
Expand Down Expand Up @@ -1679,7 +1679,7 @@ prop_correct() ->
true
end)).

est_prop() ->
prop_est() ->
%% It's hard to estimate under 10000 keys
?FORALL(N, choose(10000, 500000),
begin
Expand Down
4 changes: 3 additions & 1 deletion src/riak_core_claim.erl
Expand Up @@ -68,7 +68,9 @@

-ifdef(TEST).
-ifdef(EQC).
-export([prop_claim_ensures_unique_nodes/1, prop_wants/0, prop_wants_counts/0]).
-export([prop_claim_ensures_unique_nodes/1, prop_wants/0, prop_wants_counts/0,
prop_claim_ensures_unique_nodes_v2/0, prop_claim_ensures_unique_nodes_v3/0,
prop_take_idxs/0]).
-include_lib("eqc/include/eqc.hrl").
-endif.
-include_lib("eunit/include/eunit.hrl").
Expand Down
1 change: 1 addition & 0 deletions src/riak_core_claim_util.erl
Expand Up @@ -34,6 +34,7 @@
rotations/1, substitutions/2]).
-ifdef(TEST).
-ifdef(EQC).
-export([prop_adjacency_summary/0]).
-include_lib("eqc/include/eqc.hrl").
-endif.
-include_lib("eunit/include/eunit.hrl").
Expand Down

0 comments on commit 7d783fb

Please sign in to comment.