From 652e1f4d143f1363e0e3ca4b60df39f1a90038b2 Mon Sep 17 00:00:00 2001 From: Pranav Gaddamadugu Date: Wed, 28 Jun 2023 19:20:05 -0400 Subject: [PATCH] Regen expectations --- .../compiler/finalize/rand_incorrect_num_operands.out | 5 +++++ .../compiler/finalize/rand_incorrect_type_fail.out | 5 +++++ tests/tests/compiler/finalize/rand_incorrect_type_fail.leo | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 tests/expectations/compiler/finalize/rand_incorrect_num_operands.out create mode 100644 tests/expectations/compiler/finalize/rand_incorrect_type_fail.out diff --git a/tests/expectations/compiler/finalize/rand_incorrect_num_operands.out b/tests/expectations/compiler/finalize/rand_incorrect_num_operands.out new file mode 100644 index 0000000000..eaf065d538 --- /dev/null +++ b/tests/expectations/compiler/finalize/rand_incorrect_num_operands.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [ETYC0372006]: Call expected `0` args, but got `1`\n --> compiler-test:12:24\n |\n 12 | let a: field = ChaCha::rand_field(1field);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372006]: Call expected `0` args, but got `2`\n --> compiler-test:13:24\n |\n 13 | let b: field = ChaCha::rand_field(1field, 2field);\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" diff --git a/tests/expectations/compiler/finalize/rand_incorrect_type_fail.out b/tests/expectations/compiler/finalize/rand_incorrect_type_fail.out new file mode 100644 index 0000000000..b65143c4b8 --- /dev/null +++ b/tests/expectations/compiler/finalize/rand_incorrect_type_fail.out @@ -0,0 +1,5 @@ +--- +namespace: Compile +expectation: Fail +outputs: + - "Error [ETYC0372007]: Expected one type from `scalar`, but got `field`\n --> compiler-test:12:25\n |\n 12 | let a: scalar = ChaCha::rand_field();\n | ^^^^^^^^^^^^^^^^^^^^\nError [ETYC0372007]: Expected one type from `group`, but got `field`\n --> compiler-test:13:24\n |\n 13 | let b: group = ChaCha::rand_field();\n | ^^^^^^^^^^^^^^^^^^^^\n" diff --git a/tests/tests/compiler/finalize/rand_incorrect_type_fail.leo b/tests/tests/compiler/finalize/rand_incorrect_type_fail.leo index 45c7447d20..deb2e0e9cc 100644 --- a/tests/tests/compiler/finalize/rand_incorrect_type_fail.leo +++ b/tests/tests/compiler/finalize/rand_incorrect_type_fail.leo @@ -12,8 +12,8 @@ program test.aleo { } finalize foo() { - let a: scalar = ChaCha::rand_field(1field); - let b: group = ChaCha::rand_field(1field, 2field); + let a: scalar = ChaCha::rand_field(); + let b: group = ChaCha::rand_field(); values.set(a, b); } }