From a467ea68c7ca1c85ec6f0c2aa788bd4270552c41 Mon Sep 17 00:00:00 2001 From: Federico Giacon <58218759+fedgiac@users.noreply.github.com> Date: Thu, 15 Aug 2024 15:16:18 +0000 Subject: [PATCH] Remove test of Solidity enum parsing --- test/GPv2Signing/Helper.sol | 7 ------- test/GPv2Signing/RecoverOrderSigner.t.sol | 6 ------ 2 files changed, 13 deletions(-) diff --git a/test/GPv2Signing/Helper.sol b/test/GPv2Signing/Helper.sol index 03c251cb..088f88e2 100644 --- a/test/GPv2Signing/Helper.sol +++ b/test/GPv2Signing/Helper.sol @@ -19,13 +19,6 @@ contract Harness is GPv2SigningTestInterface { { (, owner) = recoverOrderSigner(order, signature.scheme, signature.data); } - - function uint8ToScheme(uint8 scheme) public pure returns (uint8) { - // Round trip encodes and decodes a uint8 to a Scheme and back. This is - // useful to make sure the code can't use an internally invalid signing - // scheme in its internal operations. - return uint8(GPv2Signing.Scheme(scheme)); - } } contract Helper is Test { diff --git a/test/GPv2Signing/RecoverOrderSigner.t.sol b/test/GPv2Signing/RecoverOrderSigner.t.sol index b798bae1..c5eb5faf 100644 --- a/test/GPv2Signing/RecoverOrderSigner.t.sol +++ b/test/GPv2Signing/RecoverOrderSigner.t.sol @@ -48,12 +48,6 @@ contract RecoverOrderSigner is Helper { assertEq(ethSignOwner, trader.addr); } - function test_reverts_for_invalid_signing_schemes() public { - // panic: failed to convert value into enum type - vm.expectRevert(); - executor.uint8ToScheme(42); - } - function test_reverts_for_malformed_ECDSA_signatures() public { vm.expectRevert("GPv2: malformed ecdsa signature"); executor.recoverOrderSignerTest(