diff --git a/crates/compiler/test_gen/src/gen_str.rs b/crates/compiler/test_gen/src/gen_str.rs index f50e72104c..1ea116fe73 100644 --- a/crates/compiler/test_gen/src/gen_str.rs +++ b/crates/compiler/test_gen/src/gen_str.rs @@ -692,7 +692,7 @@ fn str_from_utf8_fail_invalid_start_byte() { indoc!( r#" when Str.fromUtf8 [97, 98, 0x80, 99] is - Err (BadUtf8 InvalidStartByte byteIndex) -> + Err (BadUtf8 {problem: InvalidStartByte, index: byteIndex}) -> if byteIndex == 2 then "a" else @@ -712,7 +712,7 @@ fn str_from_utf8_fail_unexpected_end_of_sequence() { indoc!( r#" when Str.fromUtf8 [97, 98, 99, 0xC2] is - Err (BadUtf8 UnexpectedEndOfSequence byteIndex) -> + Err (BadUtf8 {problem: UnexpectedEndOfSequence, index: byteIndex}) -> if byteIndex == 3 then "a" else @@ -732,7 +732,7 @@ fn str_from_utf8_fail_expected_continuation() { indoc!( r#" when Str.fromUtf8 [97, 98, 99, 0xC2, 0x00] is - Err (BadUtf8 ExpectedContinuation byteIndex) -> + Err (BadUtf8 {problem: ExpectedContinuation, index: byteIndex}) -> if byteIndex == 3 then "a" else @@ -752,7 +752,7 @@ fn str_from_utf8_fail_overlong_encoding() { indoc!( r#" when Str.fromUtf8 [97, 0xF0, 0x80, 0x80, 0x80] is - Err (BadUtf8 OverlongEncoding byteIndex) -> + Err (BadUtf8 {problem: OverlongEncoding, index: byteIndex}) -> if byteIndex == 1 then "a" else @@ -772,7 +772,7 @@ fn str_from_utf8_fail_codepoint_too_large() { indoc!( r#" when Str.fromUtf8 [97, 0xF4, 0x90, 0x80, 0x80] is - Err (BadUtf8 CodepointTooLarge byteIndex) -> + Err (BadUtf8 {problem: CodepointTooLarge, index: byteIndex}) -> if byteIndex == 1 then "a" else @@ -792,7 +792,7 @@ fn str_from_utf8_fail_surrogate_half() { indoc!( r#" when Str.fromUtf8 [97, 98, 0xED, 0xA0, 0x80] is - Err (BadUtf8 EncodesSurrogateHalf byteIndex) -> + Err (BadUtf8 {problem: EncodesSurrogateHalf, index: byteIndex}) -> if byteIndex == 2 then "a" else diff --git a/crates/compiler/test_gen/src/wasm_str.rs b/crates/compiler/test_gen/src/wasm_str.rs index 37fe551238..0f7b35aa28 100644 --- a/crates/compiler/test_gen/src/wasm_str.rs +++ b/crates/compiler/test_gen/src/wasm_str.rs @@ -522,7 +522,7 @@ fn str_from_utf8_fail_invalid_start_byte() { indoc!( r#" when Str.fromUtf8 [97, 98, 0x80, 99] is - Err (BadUtf8 InvalidStartByte byteIndex) -> + Err (BadUtf8 {problem: InvalidStartByte, index: byteIndex}) -> if byteIndex == 2 then "a" else @@ -541,7 +541,7 @@ fn str_from_utf8_fail_unexpected_end_of_sequence() { indoc!( r#" when Str.fromUtf8 [97, 98, 99, 0xC2] is - Err (BadUtf8 UnexpectedEndOfSequence byteIndex) -> + Err (BadUtf8 {problem: UnexpectedEndOfSequence, index: byteIndex}) -> if byteIndex == 3 then "a" else @@ -560,7 +560,7 @@ fn str_from_utf8_fail_expected_continuation() { indoc!( r#" when Str.fromUtf8 [97, 98, 99, 0xC2, 0x00] is - Err (BadUtf8 ExpectedContinuation byteIndex) -> + Err (BadUtf8 {problem: ExpectedContinuation, index: byteIndex}) -> if byteIndex == 3 then "a" else @@ -579,7 +579,7 @@ fn str_from_utf8_fail_overlong_encoding() { indoc!( r#" when Str.fromUtf8 [97, 0xF0, 0x80, 0x80, 0x80] is - Err (BadUtf8 OverlongEncoding byteIndex) -> + Err (BadUtf8 {problem: OverlongEncoding, index: byteIndex}) -> if byteIndex == 1 then "a" else @@ -598,7 +598,7 @@ fn str_from_utf8_fail_codepoint_too_large() { indoc!( r#" when Str.fromUtf8 [97, 0xF4, 0x90, 0x80, 0x80] is - Err (BadUtf8 CodepointTooLarge byteIndex) -> + Err (BadUtf8 {problem: CodepointTooLarge, index: byteIndex}) -> if byteIndex == 1 then "a" else @@ -617,7 +617,7 @@ fn str_from_utf8_fail_surrogate_half() { indoc!( r#" when Str.fromUtf8 [97, 98, 0xED, 0xA0, 0x80] is - Err (BadUtf8 EncodesSurrogateHalf byteIndex) -> + Err (BadUtf8 {problem: EncodesSurrogateHalf, index: byteIndex}) -> if byteIndex == 2 then "a" else