-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automated pull of development from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix: Minimal change to avoid reverting entire PR #6685 (noir-lang/noir#6778) END_COMMIT_OVERRIDE --------- Co-authored-by: Tom French <[email protected]>
- Loading branch information
1 parent
a437e73
commit 8956e28
Showing
26 changed files
with
688 additions
and
195 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1 +1 @@ | ||
1b0dd4149d9249f0ea4fb5e2228c688e0135618f | ||
b88db67a4fa92f861329105fb732a7b1309620fe |
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
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
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
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
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
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
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
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
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
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
2 changes: 1 addition & 1 deletion
2
noir/noir-repo/test_programs/execution_success/diamond_deps_0/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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
x = 1 | ||
y = 1 | ||
return = 5 | ||
return = 7 |
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
7 changes: 7 additions & 0 deletions
7
noir/noir-repo/test_programs/execution_success/return_twice/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,7 @@ | ||
[package] | ||
name = "return_twice" | ||
version = "0.1.0" | ||
type = "bin" | ||
authors = [""] | ||
|
||
[dependencies] |
2 changes: 2 additions & 0 deletions
2
noir/noir-repo/test_programs/execution_success/return_twice/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,2 @@ | ||
return = [100, 100] | ||
in0 = 10 |
5 changes: 5 additions & 0 deletions
5
noir/noir-repo/test_programs/execution_success/return_twice/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,5 @@ | ||
pub fn main(in0: Field) -> pub (Field, Field) { | ||
let out0 = (in0 * in0); | ||
let out1 = (in0 * in0); | ||
(out0, out1) | ||
} |
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
7 changes: 7 additions & 0 deletions
7
noir/noir-repo/test_programs/noir_test_success/assert_message/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,7 @@ | ||
[package] | ||
name = "assert_message" | ||
type = "bin" | ||
authors = [""] | ||
compiler_version = ">=0.23.0" | ||
|
||
[dependencies] |
15 changes: 15 additions & 0 deletions
15
noir/noir-repo/test_programs/noir_test_success/assert_message/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,15 @@ | ||
// Have to use inputs otherwise the ACIR gets optimized away due to constants. | ||
// With the original ACIR the optimizations can rearrange or merge opcodes, | ||
// which might end up getting out of sync with assertion messages. | ||
#[test(should_fail_with = "first")] | ||
fn test_assert_message_preserved_during_optimization(a: Field, b: Field, c: Field) { | ||
if (a + b) * (a - b) != c { | ||
assert((a + b) * (a - b) == c, "first"); | ||
assert((a - b) * (a + b) == c, "second"); | ||
assert((a + b) * (a - b) == c, "third"); | ||
assert((2 * a + b) * (a - b / 2) == c * c, "fourth"); | ||
} else { | ||
// The fuzzer might have generated a passing test. | ||
assert((a + b) * (a - b) != c, "first"); | ||
} | ||
} |
Oops, something went wrong.