-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ssa refactor): euclidean division for unsigned (#1721)
* fix(ssa refactor): euclidean div for unsigned * chore(ssa refactor): cp working test
- Loading branch information
1 parent
8e9b612
commit a1596bc
Showing
4 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
crates/nargo_cli/tests/test_data_ssa_refactor/2_div/Nargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[package] | ||
authors = [""] | ||
compiler_version = "0.1" | ||
|
||
[dependencies] |
3 changes: 3 additions & 0 deletions
3
crates/nargo_cli/tests/test_data_ssa_refactor/2_div/Prover.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
x = "7" | ||
y = "3" | ||
z = "2" |
7 changes: 7 additions & 0 deletions
7
crates/nargo_cli/tests/test_data_ssa_refactor/2_div/src/main.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Testing integer division: 7/3 = 2 | ||
fn main(mut x: u32, y: u32, z: u32) { | ||
let a = x % y; | ||
assert(x / y == z); | ||
assert(a == x - z*y); | ||
assert((50 as u64) % (9 as u64) == 5); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters