aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gen/iodata.erl6
-rw-r--r--src/iodata.gleam9
2 files changed, 11 insertions, 4 deletions
diff --git a/gen/iodata.erl b/gen/iodata.erl
index a17f87a..afc2803 100644
--- a/gen/iodata.erl
+++ b/gen/iodata.erl
@@ -28,6 +28,8 @@ iodata_test() ->
end)((fun(Capture1) ->
append(Capture1, <<",">>)
end)(from([<<"ello">>])))),
- expect:equal(to_string(Iodata), <<"Hello, world!">>),
- expect:equal(byte_size(Iodata), 13).
+ (fun(Capture1) ->
+ expect:equal(Capture1, <<"Hello, world!">>)
+ end)(to_string(Iodata)),
+ (fun(Capture1) -> expect:equal(Capture1, 13) end)(byte_size(Iodata)).
-endif.
diff --git a/src/iodata.gleam b/src/iodata.gleam
index 4d81e38..7bdecec 100644
--- a/src/iodata.gleam
+++ b/src/iodata.gleam
@@ -24,6 +24,11 @@ test iodata {
|> append(_, " world!")
|> prepend(_, "H")
- expect:equal(to_string(iodata), "Hello, world!")
- expect:equal(byte_size(iodata), 13)
+ iodata
+ |> to_string
+ |> expect:equal(_, "Hello, world!")
+
+ iodata
+ |> byte_size
+ |> expect:equal(_, 13)
}