File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,14 @@ fn test_poseidon_hash_8() {
6666 assert_eq (hash , expected );
6767}
6868
69+ #[test]
70+ fn test_poseidon2_1 () {
71+ let input = [1000 ];
72+ let hash = poseidon2::Poseidon2 ::hash (input , input .len ());
73+ let expected = 0x16433a80e26a23547e25d61dd95fd5793d1ca2dcd78ae64cd146d3b99a35fa7c ;
74+ assert_eq (hash , expected );
75+ }
76+
6977#[test]
7078fn test_poseidon2_2 () {
7179 let input = [1000 , 2000 ];
@@ -75,9 +83,9 @@ fn test_poseidon2_2() {
7583}
7684
7785#[test]
78- fn test_poseidon2_1 () {
79- let input = [1000 ];
86+ fn test_poseidon2_3 () {
87+ let input = [1000 , 2000 , 3000 ];
8088 let hash = poseidon2::Poseidon2 ::hash (input , input .len ());
81- let expected = 0x118d5a5ecb25dafe99eb45cb196604a23d0b7c0cbd0c2be29e0787e59b7a1d8a ;
89+ let expected = 0x0f1badcd0d52ced816fb6e6826fdf66ada038135d53cbb993f320ca6529223cd ;
8290 assert_eq (hash , expected );
8391}
You can’t perform that action at this time.
0 commit comments