diff options
Diffstat (limited to 'gen/test/gleam@function_test.erl')
-rw-r--r-- | gen/test/gleam@function_test.erl | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/gen/test/gleam@function_test.erl b/gen/test/gleam@function_test.erl index ecac21f..d85bce1 100644 --- a/gen/test/gleam@function_test.erl +++ b/gen/test/gleam@function_test.erl @@ -11,35 +11,40 @@ compose_test() -> HeadToString = gleam@function:compose( gleam@function:compose( fun gleam@list:head/1, - fun(Capture1) -> gleam@result:unwrap(Capture1, 0) end + fun(GleamCaptureVariable) -> + gleam@result:unwrap(GleamCaptureVariable, 0) + end ), fun gleam@int:to_string/1 ), - gleam@should:equal(HeadToString([1]), <<"1">>), - gleam@should:equal(HeadToString([]), <<"0">>). + gleam@should:equal(HeadToString([1]), <<"1"/utf8>>), + gleam@should:equal(HeadToString([]), <<"0"/utf8>>). flip_test() -> Fun = fun(S, I) -> gleam@string:append( gleam@string:append( gleam@string:append( - gleam@string:append(<<"String: '">>, S), - <<"', Int: '">> + gleam@string:append(<<"String: '"/utf8>>, S), + <<"', Int: '"/utf8>> ), gleam@int:to_string(I) ), - <<"'">> + <<"'"/utf8>> ) end, FlippedFun = gleam@function:flip(Fun), - gleam@should:equal(Fun(<<"Bob">>, 1), <<"String: 'Bob', Int: '1'">>), gleam@should:equal( - FlippedFun(2, <<"Alice">>), - <<"String: 'Alice', Int: '2'">> + Fun(<<"Bob"/utf8>>, 1), + <<"String: 'Bob', Int: '1'"/utf8>> + ), + gleam@should:equal( + FlippedFun(2, <<"Alice"/utf8>>), + <<"String: 'Alice', Int: '2'"/utf8>> ). identity_test() -> gleam@should:equal(gleam@function:identity(1), 1), - gleam@should:equal(gleam@function:identity(<<"">>), <<"">>), + gleam@should:equal(gleam@function:identity(<<""/utf8>>), <<""/utf8>>), gleam@should:equal(gleam@function:identity([]), []), gleam@should:equal(gleam@function:identity({1, 2.0}), {1, 2.0}). |