1 -module(hope_result_SUITE).
18 -define(GROUP_PIPE, result_pipe).
21 %% ============================================================================
22 %% Common Test callbacks
23 %% ============================================================================
26 [{group, ?GROUP_PIPE}].
34 [{?GROUP_PIPE, Properties, Tests}].
36 init_per_group(?GROUP_PIPE, Cfg) ->
38 [ fun (0) -> {ok, 1}; (X) -> {error, X} end
39 , fun (1) -> {ok, 2}; (X) -> {error, X} end
40 , fun (2) -> {ok, 3}; (X) -> {error, X} end
42 hope_kv_list:set(Cfg, steps, Steps).
44 end_per_group(?GROUP_PIPE, _Cfg) ->
48 %% =============================================================================
50 %% =============================================================================
53 {some, Steps} = hope_kv_list:get(Cfg, steps),
54 {ok, 3} = hope_result:pipe(Steps, 0).
57 {some, Steps} = hope_kv_list:get(Cfg, steps),
58 {error, 1} = hope_result:pipe(Steps, 1).