From f6ea2b35fe4a0d0769388496ccff8602c622af5d Mon Sep 17 00:00:00 2001 From: evan-schott <53463459+evan-schott@users.noreply.github.com> Date: Mon, 25 Sep 2023 16:42:16 -0700 Subject: [PATCH] create test --- .../definition/define_multiple_variables_fail.out | 5 +++++ .../definition/define_multiple_variables_fail.leo | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/expectations/compiler/definition/define_multiple_variables_fail.out create mode 100644 tests/tests/compiler/definition/define_multiple_variables_fail.leo diff --git a/tests/expectations/compiler/definition/define_multiple_variables_fail.out b/tests/expectations/compiler/definition/define_multiple_variables_fail.out new file mode 100644 index 0000000000..601e964e3c --- /dev/null +++ b/tests/expectations/compiler/definition/define_multiple_variables_fail.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [ETYC0372082]: Tuple length mismatch:`length 3` tuple of identifiers declared, but length `2` tuple of types given`\n --> compiler-test:5:9\n |\n 5 | let (a,b,c): (u8,u8) = (2u8,3u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372082]: Tuple length mismatch:`length 2` tuple of identifiers declared, but length `3` tuple of types given`\n --> compiler-test:6:9\n |\n 6 | let (d,e): (u8,u8,u8) = (1u8,2u8,3u8);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" diff --git a/tests/tests/compiler/definition/define_multiple_variables_fail.leo b/tests/tests/compiler/definition/define_multiple_variables_fail.leo new file mode 100644 index 0000000000..adcc7b4880 --- /dev/null +++ b/tests/tests/compiler/definition/define_multiple_variables_fail.leo @@ -0,0 +1,13 @@ +/* +namespace: Compile +expectation: Fail +*/ + +program test.aleo { + function main(y: bool) -> bool { + let (a,b,c): (u8,u8) = (2u8,3u8); + let (d,e): (u8,u8,u8) = (1u8,2u8,3u8); + return y; + } +} +