File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -8,19 +8,13 @@ unconstrained fn get_poseidon2_hash(input: [Field; 10]) -> Field {
88 poseidon2_hash_oracle (input )
99}
1010
11- unconstrained fn test_poseidon2_comparison (input : [Field ; 10 ]) -> bool {
12- // get hash from Noir implementation
11+ #[test]
12+ unconstrained fn test_poseidon2 (input : [Field ; 10 ]) {
13+ // get hash from Noir implementation
1314 let noir_hash = poseidon2::Poseidon2 ::hash (input , input .len ());
1415
1516 // get hash from bb.js via oracle
1617 let bb_hash = get_poseidon2_hash (input );
1718
18- noir_hash == bb_hash
19- }
20-
21- #[test]
22- unconstrained fn test_poseidon2 (input : [Field ; 10 ]) {
23- let result = test_poseidon2_comparison (input );
24-
25- assert (result );
19+ assert_eq (noir_hash , bb_hash )
2620}
You can’t perform that action at this time.
0 commit comments