Skip to content

Commit

Permalink
Reduce coverage limits for signature verification tests (#6209)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth MacKenzie authored Jun 13, 2024
1 parent 2ec9bf3 commit 62ba600
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,21 @@ ecdsaSecp256k1Prop = do
schnorrSecp256k1Prop :: PropertyT IO ()
schnorrSecp256k1Prop = do
testCase <- forAllWith ppShow genSchnorrCase
cover 18 "malformed verification key" . is (_ShouldError . _BadVerKey) $ testCase
cover 18 "malformed signature" . is (_ShouldError . _BadSignature) $ testCase
cover 18 "mismatch of signing key and verification key" . is (_Shouldn'tError . _WrongVerKey) $ testCase
cover 18 "mismatch of message and signature" . is (_Shouldn'tError . _WrongSignature) $ testCase
cover 18 "happy path" . is (_Shouldn'tError . _AllGood) $ testCase
cover 15 "malformed verification key" . is (_ShouldError . _BadVerKey) $ testCase
cover 15 "malformed signature" . is (_ShouldError . _BadSignature) $ testCase
cover 15 "mismatch of signing key and verification key" . is (_Shouldn'tError . _WrongVerKey) $ testCase
cover 15 "mismatch of message and signature" . is (_Shouldn'tError . _WrongSignature) $ testCase
cover 15 "happy path" . is (_Shouldn'tError . _AllGood) $ testCase
runTestDataWith def testCase id VerifySchnorrSecp256k1Signature

ed25519Prop :: BuiltinSemanticsVariant DefaultFun -> PropertyT IO ()
ed25519Prop semvar = do
testCase <- forAllWith ppShow genEd25519Case
cover 18 "malformed verification key" . is (_ShouldError . _BadVerKey) $ testCase
cover 18 "malformed signature" . is (_ShouldError . _BadSignature) $ testCase
cover 18 "mismatch of signing key and verification key" . is (_Shouldn'tError . _WrongVerKey) $ testCase
cover 18 "mismatch of message and signature" . is (_Shouldn'tError . _WrongSignature) $ testCase
cover 18 "happy path" . is (_Shouldn'tError . _AllGood) $ testCase
cover 15 "malformed verification key" . is (_ShouldError . _BadVerKey) $ testCase
cover 15 "malformed signature" . is (_ShouldError . _BadSignature) $ testCase
cover 15 "mismatch of signing key and verification key" . is (_Shouldn'tError . _WrongVerKey) $ testCase
cover 15 "mismatch of message and signature" . is (_Shouldn'tError . _WrongSignature) $ testCase
cover 15 "happy path" . is (_Shouldn'tError . _AllGood) $ testCase
runTestDataWith semvar testCase id VerifyEd25519Signature

ed25519_VariantAProp :: PropertyT IO ()
Expand Down

0 comments on commit 62ba600

Please sign in to comment.