3c0a6ec5a93c3da480450bbe53edc48b738b5c8f
[hope.git] / test / hope_result_SUITE.erl
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
22 all() ->
23 [{group, ?GROUP_PIPE}].
24
25 groups() ->
26 Tests =
27 [ t_pipe
28 ],
29 Properties = [],
30 [{?GROUP_PIPE, Properties, Tests}].
31
32
33 %% =============================================================================
34 %% Test cases
35 %% =============================================================================
36
37 t_pipe(_Config) ->
38 Steps =
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
42 ],
43 {ok, 3} = hope_result:pipe(Steps, 0).
This page took 0.044192 seconds and 3 git commands to generate.