Skip to content

Commit

Permalink
chore: run all test programs in brillig as well as ACIR (#5128)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

This PR helps ensure consistency between ACIR and brillig by checking
that every `execution_success` test case were compiled and run in
brillig then it would succeed.

This has thrown up a couple of test case failures which I've added to a
list to be ignored for now. We can address these in follow-up PRs

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** 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.
  • Loading branch information
TomAFrench authored May 29, 2024
1 parent f03f8ae commit b545744
Show file tree
Hide file tree
Showing 39 changed files with 43 additions and 268 deletions.
2 changes: 0 additions & 2 deletions test_programs/execution_success/brillig_array_eq/Prover.toml

This file was deleted.

4 changes: 0 additions & 4 deletions test_programs/execution_success/brillig_array_eq/src/main.nr

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions test_programs/execution_success/brillig_embedded_curve/src/main.nr

This file was deleted.

70 changes: 0 additions & 70 deletions test_programs/execution_success/brillig_schnorr/Prover.toml

This file was deleted.

25 changes: 0 additions & 25 deletions test_programs/execution_success/brillig_schnorr/src/main.nr

This file was deleted.

6 changes: 0 additions & 6 deletions test_programs/execution_success/brillig_signed_cmp/Nargo.toml

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions test_programs/execution_success/brillig_to_be_bytes/src/main.nr

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions test_programs/execution_success/brillig_to_le_bytes/src/main.nr

This file was deleted.

6 changes: 0 additions & 6 deletions test_programs/execution_success/brillig_top_level/Nargo.toml

This file was deleted.

2 changes: 0 additions & 2 deletions test_programs/execution_success/brillig_top_level/Prover.toml

This file was deleted.

6 changes: 0 additions & 6 deletions test_programs/execution_success/brillig_top_level/src/main.nr

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "brillig_to_bits"
name = "empty"
type = "bin"
authors = [""]
[dependencies]
1 change: 1 addition & 0 deletions test_programs/execution_success/empty/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fn main() {}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "brillig_schnorr"
name = "signed_cmp"
type = "bin"
authors = [""]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
unconstrained fn main(minus_one: i8) {
fn main(minus_one: i8) {
assert(minus_one < 0);
assert(0 < minus_one as u8);
assert(0 > minus_one);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "brillig_array_eq"
name = "signed_div"
type = "bin"
authors = [""]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[package]
name = "brillig_wrapping"
name = "to_bits"
type = "bin"
authors = [""]

[dependencies]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use dep::std;

unconstrained fn main() {
fn main() {
let field = 1000;
let be_bits = field.to_be_bits(16);
let le_bits = field.to_le_bits(16);
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "brillig_signed_div"
name = "wrapping_operations"
type = "bin"
authors = [""]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use dep::std;

unconstrained fn main(x: u8, y: u8) {
fn main(x: u8, y: u8) {
assert(std::wrapping_sub(x, 1) == y);
assert(std::wrapping_add(y, 1) == x);
assert(std::wrapping_mul(y, y) == 1);
Expand Down
Loading

0 comments on commit b545744

Please sign in to comment.