From d613e26ebd67b704ab58c28cc559ee01ae03b547 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Fri, 15 Mar 2019 14:50:11 +0000 Subject: Erase directly called capture funs --- gen/iodata.erl | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'gen/iodata.erl') diff --git a/gen/iodata.erl b/gen/iodata.erl index afc2803..5503bf1 100644 --- a/gen/iodata.erl +++ b/gen/iodata.erl @@ -21,15 +21,8 @@ byte_size(A) -> -ifdef(TEST). iodata_test() -> - Iodata = (fun(Capture1) -> - prepend(Capture1, <<"H">>) - end)((fun(Capture1) -> - append(Capture1, <<" world!">>) - end)((fun(Capture1) -> - append(Capture1, <<",">>) - end)(from([<<"ello">>])))), - (fun(Capture1) -> - expect:equal(Capture1, <<"Hello, world!">>) - end)(to_string(Iodata)), - (fun(Capture1) -> expect:equal(Capture1, 13) end)(byte_size(Iodata)). + Iodata = prepend(append(append(from([<<"ello">>]), <<",">>), <<" world!">>), + <<"H">>), + expect:equal(to_string(Iodata), <<"Hello, world!">>), + expect:equal(byte_size(Iodata), 13). -endif. -- cgit v1.2.3