Make result pipe test more intuitive.
[hope.git] / test / hope_result_SUITE.erl
CommitLineData
7e9d7f2c
SK
1-module(hope_result_SUITE).
2
3%% Callbacks
4-export(
5 [ all/0
6 , groups/0
7 ]).
8
9%% Test cases
10-export(
11 [ t_pipe/1
12 ]).
13
14
15-define(GROUP_PIPE, result_pipe).
16
17
18%% ============================================================================
19%% Common Test callbacks
20%% ============================================================================
21
22all() ->
23 [{group, ?GROUP_PIPE}].
24
25groups() ->
26 Tests =
27 [ t_pipe
28 ],
29 Properties = [],
30 [{?GROUP_PIPE, Properties, Tests}].
31
32
33%% =============================================================================
34%% Test cases
35%% =============================================================================
36
37t_pipe(_Config) ->
7e9d7f2c 38 Steps =
55182c1b
SK
39 [ fun (0) -> {ok, 1}; (X) -> {error, X} end
40 , fun (1) -> {ok, 2}; (X) -> {error, X} end
41 , fun (2) -> {ok, 3}; (X) -> {error, X} end
7e9d7f2c 42 ],
55182c1b 43 {ok, 3} = hope_result:pipe(Steps, 0).
This page took 0.02291 seconds and 4 git commands to generate.