+
+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).
+
+t_lift_exn(_Cfg) ->
+ Class = throw,
+ Reason = foofoo,
+ Label = bar,
+ F = fun (ok) -> apply(erlang, Class, [Reason]) end,
+ G = hope_result:lift_exn(F),
+ H = hope_result:lift_exn(F, Label),
+ {error, {Class, Reason}} = G(ok),
+ {error, {Label, {Class, Reason}}} = H(ok).
+
+t_return(_Cfg) ->
+ X = foo,
+ {ok, X} = hope_result:return(X).
+
+t_map(_Cfg) ->
+ X = foo,
+ Y = bar,
+ F = fun (foo) -> Y end,
+ {ok, Y} = hope_result:map({ok, X}, F),
+ {error, X} = hope_result:map({error, X}, F).