diff --git a/test-foundry/L1ArbitrumExtendedGateway.t.sol b/test-foundry/L1ArbitrumExtendedGateway.t.sol index 128e5b86db..0f7007110e 100644 --- a/test-foundry/L1ArbitrumExtendedGateway.t.sol +++ b/test-foundry/L1ArbitrumExtendedGateway.t.sol @@ -186,16 +186,18 @@ abstract contract L1ArbitrumExtendedGatewayTest is Test { ); } - function test_supportsInterface(bytes4 iface) public { - bool expected = false; - if ( - iface == type(IERC165).interfaceId || - iface == IL1ArbitrumGateway.outboundTransferCustomRefund.selector - ) { - expected = true; - } - - assertEq(l1Gateway.supportsInterface(iface), expected, "Interface shouldn't be supported"); + function test_supportsInterface() public { + bytes4 iface = type(IERC165).interfaceId; + assertEq(l1Gateway.supportsInterface(iface), true, "Interface should be supported"); + + iface = IL1ArbitrumGateway.outboundTransferCustomRefund.selector; + assertEq(l1Gateway.supportsInterface(iface), true, "Interface should be supported"); + + iface = bytes4(0); + assertEq(l1Gateway.supportsInterface(iface), false, "Interface shouldn't be supported"); + + iface = IL1ArbitrumGateway.inbox.selector; + assertEq(l1Gateway.supportsInterface(iface), false, "Interface shouldn't be supported"); } function test_transferExitAndCall_EmptyData_NotRedirected( diff --git a/test-foundry/L1GatewayRouter.t.sol b/test-foundry/L1GatewayRouter.t.sol index ad53629525..53f9d9f0e9 100644 --- a/test-foundry/L1GatewayRouter.t.sol +++ b/test-foundry/L1GatewayRouter.t.sol @@ -664,16 +664,18 @@ contract L1GatewayRouterTest is GatewayRouterTest { l1Router.setOwner(address(300)); } - function test_supportsInterface(bytes4 iface) public { - bool expected = false; - if ( - iface == type(IERC165).interfaceId || - iface == L1GatewayRouter.outboundTransferCustomRefund.selector - ) { - expected = true; - } + function test_supportsInterface() public { + bytes4 iface = type(IERC165).interfaceId; + assertEq(l1Router.supportsInterface(iface), true, "Interface should be supported"); + + iface = L1GatewayRouter.outboundTransferCustomRefund.selector; + assertEq(l1Router.supportsInterface(iface), true, "Interface should be supported"); + + iface = bytes4(0); + assertEq(l1Router.supportsInterface(iface), false, "Interface shouldn't be supported"); - assertEq(l1Router.supportsInterface(iface), expected, "Interface shouldn't be supported"); + iface = L1GatewayRouter.setGateways.selector; + assertEq(l1Router.supportsInterface(iface), false, "Interface shouldn't be supported"); } function test_outboundTransfer() public virtual {