X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=test%2Fhope_fun_SUITE.erl;h=333c81f74c5184cb44f66a613465aca1805a0f44;hb=70ad3cb1326eed3f1d682b3e024ff8578706e15f;hp=7b5051b6289faad7a8d642a1de1e0fa61bb6a115;hpb=0b6ed6177fd85b5dd1b6ceadb9c2e2560c6597d2;p=hope.git diff --git a/test/hope_fun_SUITE.erl b/test/hope_fun_SUITE.erl index 7b5051b..333c81f 100644 --- a/test/hope_fun_SUITE.erl +++ b/test/hope_fun_SUITE.erl @@ -11,7 +11,7 @@ [ t_specs/1 , t_id/1 , t_curry/1 - , t_compose/1 + , t_compose_and_thread/1 ]). @@ -31,7 +31,7 @@ groups() -> [ t_specs , t_id , t_curry - , t_compose + , t_compose_and_thread ], Properties = [parallel], [ {?GROUP, Properties, Tests} @@ -66,11 +66,12 @@ t_curry(_Cfg) -> H = H2(b), {a, b, c} = H(c). -t_compose(_Cfg) -> +t_compose_and_thread(_Cfg) -> A2B = fun (a) -> b end, B2C = fun (b) -> c end, C2D = fun (c) -> d end, Fs = [C2D, B2C, A2B], d = (hope_fun:compose ( Fs ))(a), d = (hope_fun:compose_right ( Fs ))(a), - d = (hope_fun:compose_left (lists:reverse(Fs) ))(a). + d = (hope_fun:compose_left (lists:reverse(Fs) ))(a), + d = hope_fun:thread (lists:reverse(Fs), a).