Skip to content

Commit 5b80379

Browse files
committed
Fix interpreter fmt test
1 parent 4e9728a commit 5b80379

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/eval/test/eval_test.zig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,11 +2135,12 @@ test "encode: Str.encode with local format type" {
21352135
try runExpectListI64(
21362136
\\{
21372137
\\ Utf8Format := {}.{
2138-
\\ encode_str : Utf8Format, Str -> List(U8)
2139-
\\ encode_str = |_fmt, s| Str.to_utf8(s)
2138+
\\ encode_str : Utf8Format, Str -> Try(List(U8), [])
2139+
\\ encode_str = |_fmt, s| Ok(Str.to_utf8(s))
21402140
\\ }
21412141
\\ fmt = Utf8Format
2142-
\\ bytes = Str.encode("hi", fmt)
2142+
\\ result = Str.encode("hi", fmt)
2143+
\\ bytes = result?
21432144
\\ List.map(bytes, |b| U8.to_i64(b))
21442145
\\}
21452146
, &[_]i64{ 104, 105 }, .no_trace);

0 commit comments

Comments
 (0)