Skip to content

Commit fb1d252

Browse files
committed
Add one more test vector for TestHashWithState
1 parent 36c5a14 commit fb1d252

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

poseidon/poseidon_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,17 @@ func TestHashWithState(t *testing.T) {
138138
b4 := big.NewInt(4)
139139
b5 := big.NewInt(5)
140140
b6 := big.NewInt(6)
141+
b7 := big.NewInt(7)
142+
b8 := big.NewInt(8)
143+
b9 := big.NewInt(9)
144+
b10 := big.NewInt(10)
145+
b11 := big.NewInt(11)
146+
b12 := big.NewInt(12)
147+
b13 := big.NewInt(13)
148+
b14 := big.NewInt(14)
149+
b15 := big.NewInt(15)
150+
b16 := big.NewInt(16)
151+
b17 := big.NewInt(17)
141152

142153
h, err := HashWithState([]*big.Int{b1, b2, b3, b4, b5, b6}, initState0)
143154
assert.Nil(t, err)
@@ -150,6 +161,12 @@ func TestHashWithState(t *testing.T) {
150161
assert.Equal(t,
151162
"1569211601569591254857354699102545060324851338714426496554851741114291465006",
152163
h.String())
164+
165+
h, err = HashWithState([]*big.Int{b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16}, b17)
166+
assert.Nil(t, err)
167+
assert.Equal(t,
168+
"7865037705064445207187340054656830232157001572238023180016026650118519857086",
169+
h.String())
153170
}
154171

155172
func TestInitStateNotInField(t *testing.T) {

0 commit comments

Comments
 (0)