--- /dev/null
+{incl_app, hope, details}.
{deps,
[{proper, ".*", {git, "https://github.com/manopapad/proper.git", {tag, "v1.1"}}}]
}.
+
+{cover_enabled, true}.
+
+{clean_files, ["test/*.beam"]}.
-module(hope_dictionary_SUITE).
+-include_lib("proper/include/proper.hrl").
+
%% Callbacks
-export(
[ all/0
, t_set_existing/1
, t_pop/1
, t_fold/1
+ , t_dictionary_specs/1
]).
, t_set_existing
, t_pop
, t_fold
+ , t_dictionary_specs
],
- Properties = [],
+ Properties = [parallel],
[{?DICT_MODULE_KV_LIST, Properties, Tests}].
init_per_group(DictModule, Cfg) ->
KVList = [{a, 1}, {a, 5}, {b, 3}, {c, 4}, {c, 4}],
Dict = DictModule:of_kv_list(KVList),
17 = DictModule:fold(Dict, fun (_K, V, Acc) -> V + Acc end, 0).
+
+t_dictionary_specs(Cfg) ->
+ {some, DictModule} = hope_kv_list:get(Cfg, ?DICT_MODULE),
+ [] = proper:check_specs(DictModule).
%% Test cases
-export(
[ t_unique_preserve_order/1
+ , t_hope_list_specs/1
]).
groups() ->
Tests =
[ t_unique_preserve_order
+ , t_hope_list_specs
],
- Properties = [],
+ Properties = [parallel],
[{?GROUP, Properties, Tests}].
hope_list:unique_preserve_order(L) ==
lists:reverse(lists:reverse(L) -- Duplicates)
end).
+
+t_hope_list_specs(_) ->
+ [] = proper:check_specs(hope_list).
-module(hope_result_SUITE).
+-include_lib("proper/include/proper.hrl").
+
%% Callbacks
-export(
[ all/0
-export(
[ t_pipe_ok/1
, t_pipe_error/1
+ , t_hope_result_specs/1
]).
Tests =
[ t_pipe_ok
, t_pipe_error
+ , t_hope_result_specs
],
- Properties = [],
+ Properties = [parallel],
[{?GROUP_PIPE, Properties, Tests}].
init_per_group(?GROUP_PIPE, Cfg) ->
t_pipe_error(Cfg) ->
{some, Steps} = hope_kv_list:get(Cfg, steps),
{error, 1} = hope_result:pipe(Steps, 1).
+
+t_hope_result_specs(_) ->
+ [] = proper:check_specs(hope_result).