From 64c144a3f88b2cd925cd7707d43386d966c072a6 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 3 Jan 2024 17:44:59 +0000 Subject: [PATCH] chore: add test case for brillig array equality assertion (#3936) # Description ## Problem\* Resolves https://github.com/AztecProtocol/aztec-packages/issues/3752 ## Summary\* This PR adds a regression test for https://github.com/AztecProtocol/aztec-packages/issues/3752 which was fixed in https://github.com/noir-lang/noir/pull/3916. ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --- test_programs/execution_success/brillig_array_eq/Nargo.toml | 6 ++++++ .../execution_success/brillig_array_eq/Prover.toml | 2 ++ .../execution_success/brillig_array_eq/src/main.nr | 4 ++++ 3 files changed, 12 insertions(+) create mode 100644 test_programs/execution_success/brillig_array_eq/Nargo.toml create mode 100644 test_programs/execution_success/brillig_array_eq/Prover.toml create mode 100644 test_programs/execution_success/brillig_array_eq/src/main.nr diff --git a/test_programs/execution_success/brillig_array_eq/Nargo.toml b/test_programs/execution_success/brillig_array_eq/Nargo.toml new file mode 100644 index 00000000000..62ce392f96b --- /dev/null +++ b/test_programs/execution_success/brillig_array_eq/Nargo.toml @@ -0,0 +1,6 @@ +[package] +name = "brillig_array_eq" +type = "bin" +authors = [""] + +[dependencies] diff --git a/test_programs/execution_success/brillig_array_eq/Prover.toml b/test_programs/execution_success/brillig_array_eq/Prover.toml new file mode 100644 index 00000000000..ecfed7de213 --- /dev/null +++ b/test_programs/execution_success/brillig_array_eq/Prover.toml @@ -0,0 +1,2 @@ +a = [77,75,108,209,54,16,50,202,155,210,174,185,217,0,170,77,69,217,234,216,10,201,66,51,116,196,81,167,37,77,7,102] +b = [77,75,108,209,54,16,50,202,155,210,174,185,217,0,170,77,69,217,234,216,10,201,66,51,116,196,81,167,37,77,7,102] diff --git a/test_programs/execution_success/brillig_array_eq/src/main.nr b/test_programs/execution_success/brillig_array_eq/src/main.nr new file mode 100644 index 00000000000..90f631dbed8 --- /dev/null +++ b/test_programs/execution_success/brillig_array_eq/src/main.nr @@ -0,0 +1,4 @@ +// Simple example of checking where two arrays are equal +unconstrained fn main(a: [Field; 32], b: [Field; 32]) { + assert(a == b); +}