-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test that uses expression_width in manifest
- Loading branch information
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
test_programs/execution_success/poseidon_bn254_hash_width_3/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,8 @@ | ||
[package] | ||
name = "poseidon_bn254_hash_width_3" | ||
type = "bin" | ||
authors = [""] | ||
compiler_version = ">=0.31.0" | ||
expression_width = "3" | ||
|
||
[dependencies] |
4 changes: 4 additions & 0 deletions
4
test_programs/execution_success/poseidon_bn254_hash_width_3/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,4 @@ | ||
x1 = [1,2] | ||
y1 = "0x115cc0f5e7d690413df64c6b9662e9cf2a3617f2743245519e19607a4417189a" | ||
x2 = [1,2,3,4] | ||
y2 = "0x299c867db6c1fdd79dcefa40e4510b9837e60ebb1ce0663dbaa525df65250465" |
9 changes: 9 additions & 0 deletions
9
test_programs/execution_success/poseidon_bn254_hash_width_3/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,9 @@ | ||
use std::hash::poseidon; | ||
|
||
fn main(x1: [Field; 2], y1: pub Field, x2: [Field; 4], y2: pub Field) { | ||
let hash1 = poseidon::bn254::hash_2(x1); | ||
assert(hash1 == y1); | ||
|
||
let hash2 = poseidon::bn254::hash_4(x2); | ||
assert(hash2 == y2); | ||
} |