From f35b1205884a799e1675c4640cbc77263cee0260 Mon Sep 17 00:00:00 2001 From: gluax Date: Tue, 29 Jun 2021 21:12:24 -0700 Subject: [PATCH] test cases for lest test --- tests/compiler/array/complex_access.leo | 5 +++-- .../compiler/compiler/array/complex_access.leo.out | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/compiler/array/complex_access.leo b/tests/compiler/array/complex_access.leo index 9bd44ad177..0342e81a57 100644 --- a/tests/compiler/array/complex_access.leo +++ b/tests/compiler/array/complex_access.leo @@ -6,11 +6,12 @@ input_file: */ function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; (3, 4)] ) -> bool { - a[d] = 93; + a[b] = 93; a[2..6][1] = 87; a[2..6][1] *= 2; a[2..3] = [42u8]; a[6..][0] = 43u8; + a[0..1][0..1] = [200]; c[0..2][0] = [1u8; 3]; c[1..][1][1..2][0] = 126; @@ -22,7 +23,7 @@ function main (a: [u8; 8], b: u32, c: [[u8; 3]; 3], d: [(u8, u32); 1], e: [u8; ( e[0..][0][0] = 33; return - a == [93u8, 2, 42, 174, 5, 6, 43, 8] + a == [200u8, 93, 42, 174, 5, 6, 43, 8] && c == [[1u8, 1, 1], [42, 43, 44], [7, 126, 9]] && d == [(0u8, 1u32)] && e == [[33u8, 22, 22, 22], [0, 0, 0, 0], [0, 0, 0, 0]]; diff --git a/tests/expectations/compiler/compiler/array/complex_access.leo.out b/tests/expectations/compiler/compiler/array/complex_access.leo.out index 471ffe9965..c77bd962af 100644 --- a/tests/expectations/compiler/compiler/array/complex_access.leo.out +++ b/tests/expectations/compiler/compiler/array/complex_access.leo.out @@ -4,11 +4,11 @@ expectation: Pass outputs: - circuit: num_public_variables: 0 - num_private_variables: 239 - num_constraints: 239 - at: 61be39f73914fdb4059c5d5e5776840262ab56dc414aa09106ddfee1d27ba174 - bt: 3f2d18346ecde92782f60a29649e187402d8f2059cf934b31f5606c4d4381883 - ct: db5fb9e237a13bca372ce7d3f232661fdf07c8ae7ef3d99517438a3532f59a41 + num_private_variables: 871 + num_constraints: 936 + at: f7d612942f5c3f107a3e06209c638408f12a0db8f6a4be80fca5328bf25fa80b + bt: 2d3d568db1dcbfca0ab1a21386e91fb10d5a14ce39a8f9115a87c4d44c8afa72 + ct: 010cb4c6859360fa1d7385aa4f93b3ca19f441be07e933be39680fa88bb617c2 output: - input_file: input/complex_access.in output: