Skip to content

Commit

Permalink
chore(tests): use assert instead of constrain (#1288)
Browse files Browse the repository at this point in the history
  • Loading branch information
joss-aztec authored May 4, 2023
1 parent 80f436d commit b6e606b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/nargo_cli/tests/test_data/array_dynamic/src/main.nr
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ fn main(x: [u32; 5], mut z: u32, t: u32) {
}

fn dyn_array(mut x: [u32; 5], y: Field, z: Field) {
constrain x[y] == 111;
constrain x[z] == 101;
assert(x[y] == 111);
assert(x[z] == 101);
x[z] = 0;
constrain x[y] == 111;
constrain x[1] == 0;
assert(x[y] == 111);
assert(x[1] == 0);
if y as u32 < 10 {
x[y] = x[y] - 2;
} else {
x[y] = 0;
}
constrain x[4] == 109;
assert(x[4] == 109);
}

0 comments on commit b6e606b

Please sign in to comment.