1 -module(hope_result_SUITE).
3 -include_lib("proper/include/proper.hrl").
17 , t_hope_result_specs/1
21 -define(GROUP_PIPE, result_pipe).
24 %% ============================================================================
25 %% Common Test callbacks
26 %% ============================================================================
29 [{group, ?GROUP_PIPE}].
37 Properties = [parallel],
38 [{?GROUP_PIPE, Properties, Tests}].
40 init_per_group(?GROUP_PIPE, Cfg) ->
42 [ fun (0) -> {ok, 1}; (X) -> {error, X} end
43 , fun (1) -> {ok, 2}; (X) -> {error, X} end
44 , fun (2) -> {ok, 3}; (X) -> {error, X} end
46 hope_kv_list:set(Cfg, steps, Steps).
48 end_per_group(?GROUP_PIPE, _Cfg) ->
52 %% =============================================================================
54 %% =============================================================================
57 {some, Steps} = hope_kv_list:get(Cfg, steps),
58 {ok, 3} = hope_result:pipe(Steps, 0).
61 {some, Steps} = hope_kv_list:get(Cfg, steps),
62 {error, 1} = hope_result:pipe(Steps, 1).
64 t_hope_result_specs(_) ->
65 [] = proper:check_specs(hope_result).