From 18482d7b1855ea3cb47e4ac2a10775486396d7f7 Mon Sep 17 00:00:00 2001 From: Pranav Gaddamadugu Date: Tue, 23 Aug 2022 19:40:38 -0700 Subject: [PATCH] Regen test expectations --- .../compiler/statements/compare_diff_types_fail.out | 2 +- .../compiler/statements/non_existant_vars_mul_fail.out | 2 +- .../compiler/statements/typecheck_statements_fail.out | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 tests/expectations/compiler/statements/typecheck_statements_fail.out diff --git a/tests/expectations/compiler/statements/compare_diff_types_fail.out b/tests/expectations/compiler/statements/compare_diff_types_fail.out index b953fdbe50..300f5d7a1d 100644 --- a/tests/expectations/compiler/statements/compare_diff_types_fail.out +++ b/tests/expectations/compiler/statements/compare_diff_types_fail.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ETYC0372003]: Expected type `u8` but type `i8` was found\n --> compiler-test:4:19\n |\n 4 | let b: bool = a == 1u8;\n | ^^^^^^^^\nError [ETYC0372003]: Expected type `u8` but type `i8` was found\n --> compiler-test:5:19\n |\n 5 | let c: bool = a != 1u8;\n | ^^^^^^^^\nError [ETYC0372003]: Expected type `u8` but type `i8` was found\n --> compiler-test:6:19\n |\n 6 | let d: bool = a > 1u8;\n | ^^^^^^^\nError [ETYC0372003]: Expected type `u8` but type `i8` was found\n --> compiler-test:7:19\n |\n 7 | let e: bool = a < 1u8;\n | ^^^^^^^\nError [ETYC0372003]: Expected type `u8` but type `i8` was found\n --> compiler-test:8:19\n |\n 8 | let f: bool = a >= 1u8;\n | ^^^^^^^^\nError [ETYC0372003]: Expected type `u8` but type `i8` was found\n --> compiler-test:9:19\n |\n 9 | let g: bool = a <= 1u8;\n | ^^^^^^^^\n" + - "Error [ETYC0372003]: Expected type `u8` but type `i8` was found\n --> compiler-test:4:19\n |\n 4 | let b: bool = a == 1u8;\n | ^^^^^^^^\nError [ETYC0372003]: Expected type `u8` but type `i8` was found\n --> compiler-test:5:19\n |\n 5 | let c: bool = a != 1u8;\n | ^^^^^^^^\nError [ETYC0372003]: Expected type `u8` but type `i8` was found\n --> compiler-test:6:19\n |\n 6 | let d: bool = a > 1u8;\n | ^^^^^^^\nError [ETYC0372003]: Expected type `u8` but type `i8` was found\n --> compiler-test:7:19\n |\n 7 | let e: bool = a < 1u8;\n | ^^^^^^^\nError [ETYC0372003]: Expected type `u8` but type `i8` was found\n --> compiler-test:8:19\n |\n 8 | let f: bool = a >= 1u8;\n | ^^^^^^^^\nError [ETYC0372003]: Expected type `u8` but type `i8` was found\n --> compiler-test:9:19\n |\n 9 | let g: bool = a <= 1u8;\n | ^^^^^^^^\nError [ETYC0372007]: Expected one type from `i8`, but got `u8`\n --> compiler-test:10:22\n |\n 10 | let h: u32 = a * 1u8;\n | ^^^\nError [ETYC0372007]: Expected one type from `i8`, but got `u32`\n --> compiler-test:10:18\n |\n 10 | let h: u32 = a * 1u8;\n | ^^^^^^^\n" diff --git a/tests/expectations/compiler/statements/non_existant_vars_mul_fail.out b/tests/expectations/compiler/statements/non_existant_vars_mul_fail.out index d0fa22eb14..fe23a8bbe6 100644 --- a/tests/expectations/compiler/statements/non_existant_vars_mul_fail.out +++ b/tests/expectations/compiler/statements/non_existant_vars_mul_fail.out @@ -2,4 +2,4 @@ namespace: Compile expectation: Fail outputs: - - "Error [ETYC0372005]: Unknown variable `x`\n --> compiler-test:4:14\n |\n 4 | \tlet b: u8 = x*z;\n | ^\nError [ETYC0372005]: Unknown variable `z`\n --> compiler-test:4:16\n |\n 4 | \tlet b: u8 = x*z;\n | ^\n" + - "Error [ETYC0372005]: Unknown variable `x`\n --> compiler-test:4:14\n |\n 4 | \tlet b: u8 = x*z;\n | ^\nError [ETYC0372005]: Unknown variable `z`\n --> compiler-test:4:16\n |\n 4 | \tlet b: u8 = x*z;\n | ^\nError [ETYC0372004]: Could not determine the type of `x`\n --> compiler-test:4:14\n |\n 4 | \tlet b: u8 = x*z;\n | ^\nError [ETYC0372004]: Could not determine the type of `z`\n --> compiler-test:4:16\n |\n 4 | \tlet b: u8 = x*z;\n | ^\n" diff --git a/tests/expectations/compiler/statements/typecheck_statements_fail.out b/tests/expectations/compiler/statements/typecheck_statements_fail.out new file mode 100644 index 0000000000..a981063388 --- /dev/null +++ b/tests/expectations/compiler/statements/typecheck_statements_fail.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [ETYC0372007]: Expected one type from `i16`, but got `i32`\n --> compiler-test:5:29\n |\n 5 | let c1 : u32 = 123i16 * 123i32;\n | ^^^^^^\nError [ETYC0372007]: Expected one type from `i16`, but got `u32`\n --> compiler-test:5:20\n |\n 5 | let c1 : u32 = 123i16 * 123i32;\n | ^^^^^^^^^^^^^^^\nError [ETYC0372007]: Expected one type from `i16`, but got `string`\n --> compiler-test:6:20\n |\n 6 | let c2 : u32 = \"123i32\" * 123i16 * \"sss\";\n | ^^^^^^^^\nError [ETYC0372007]: Expected one type from `i16`, but got `string`\n --> compiler-test:6:40\n |\n 6 | let c2 : u32 = \"123i32\" * 123i16 * \"sss\";\n | ^^^^^\nError [ETYC0372007]: Expected one type from `i16`, but got `u32`\n --> compiler-test:6:20\n |\n 6 | let c2 : u32 = \"123i32\" * 123i16 * \"sss\";\n | ^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372003]: Expected type `field, group, integer, or scalar` but type `string` was found\n --> compiler-test:7:20\n |\n 7 | let c3 : u32 = \"123i32\" * \"sss\";\n | ^^^^^^^^\nError [ETYC0372003]: Expected type `field, group, integer, or scalar` but type `string` was found\n --> compiler-test:7:31\n |\n 7 | let c3 : u32 = \"123i32\" * \"sss\";\n | ^^^^^\nError [ETYC0372007]: Expected one type from `i8`, but got `i16`\n --> compiler-test:8:26\n |\n 8 | let c4 : u32 = 1i8 * 2i16 * 3i32 * 4i64 * 5u8 * 6u16 * 7u32 * 9u64;\n | ^^^^\nError [ETYC0372007]: Expected one type from `i8`, but got `i32`\n --> compiler-test:8:33\n |\n 8 | let c4 : u32 = 1i8 * 2i16 * 3i32 * 4i64 * 5u8 * 6u16 * 7u32 * 9u64;\n | ^^^^\nError [ETYC0372007]: Expected one type from `i8`, but got `i64`\n --> compiler-test:8:40\n |\n 8 | let c4 : u32 = 1i8 * 2i16 * 3i32 * 4i64 * 5u8 * 6u16 * 7u32 * 9u64;\n | ^^^^\nError [ETYC0372007]: Expected one type from `i8`, but got `u8`\n --> compiler-test:8:47\n |\n 8 | let c4 : u32 = 1i8 * 2i16 * 3i32 * 4i64 * 5u8 * 6u16 * 7u32 * 9u64;\n | ^^^\nError [ETYC0372007]: Expected one type from `i8`, but got `u16`\n --> compiler-test:8:53\n |\n 8 | let c4 : u32 = 1i8 * 2i16 * 3i32 * 4i64 * 5u8 * 6u16 * 7u32 * 9u64;\n | ^^^^\nError [ETYC0372007]: Expected one type from `i8`, but got `u32`\n --> compiler-test:8:60\n |\n 8 | let c4 : u32 = 1i8 * 2i16 * 3i32 * 4i64 * 5u8 * 6u16 * 7u32 * 9u64;\n | ^^^^\nError [ETYC0372007]: Expected one type from `i8`, but got `u64`\n --> compiler-test:8:67\n |\n 8 | let c4 : u32 = 1i8 * 2i16 * 3i32 * 4i64 * 5u8 * 6u16 * 7u32 * 9u64;\n | ^^^^\nError [ETYC0372007]: Expected one type from `i8`, but got `u32`\n --> compiler-test:8:20\n |\n 8 | let c4 : u32 = 1i8 * 2i16 * 3i32 * 4i64 * 5u8 * 6u16 * 7u32 * 9u64;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"