Skip to content

Commit 38a0bc0

Browse files
committed
test: ensure full coverage with small and large s
1 parent 2ec5218 commit 38a0bc0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

std/evmprecompiles/01-ecrecover_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,12 @@ func TestECRecoverCircuitShortMismatch(t *testing.T) {
133133
func TestECRecoverCircuitFull(t *testing.T) {
134134
assert := test.NewAssert(t)
135135
circuit, witness := testRoutineECRecover(t, false)
136+
_, witness2 := testRoutineECRecover(t, true)
136137

137138
assert.CheckCircuit(
138139
circuit,
139140
test.WithValidAssignment(witness),
141+
test.WithValidAssignment(witness2),
140142
test.WithCurves(ecc.BN254, ecc.BLS12_377),
141143
test.NoProverChecks(),
142144
)
@@ -258,6 +260,10 @@ func TestInvalidFailureTag(t *testing.T) {
258260
witness.IsFailure = 1
259261
err := test.IsSolved(circuit, witness, ecc.BN254.ScalarField())
260262
assert.Error(err)
263+
_, witness2 := testRoutineECRecover(t, true)
264+
witness2.IsFailure = 1
265+
err = test.IsSolved(circuit, witness2, ecc.BN254.ScalarField())
266+
assert.Error(err)
261267
}
262268

263269
func TestLargeV(t *testing.T) {

0 commit comments

Comments
 (0)