diff --git a/test/solidity/LiFiDiamond.t.sol b/test/solidity/LiFiDiamond.t.sol index fccbd8541..17b5d9c58 100644 --- a/test/solidity/LiFiDiamond.t.sol +++ b/test/solidity/LiFiDiamond.t.sol @@ -28,6 +28,7 @@ contract LiFiDiamondTest is DSTest { ); error FunctionDoesNotExist(); + error ShouldNotReachThisCode(); function setUp() public { diamondOwner = address(123456); @@ -91,7 +92,8 @@ contract LiFiDiamondTest is DSTest { bytes memory callData = hex"a516f0f3"; // getPeripheryContract(string) vm.expectRevert(FunctionDoesNotExist.selector); - address(diamond).call(callData); + (bool success, ) = address(diamond).call(callData); + if (success) revert("ShouldNotReachThisCode"); } function test_CanReceiveETH() public { diff --git a/test/solidity/LiFiDiamondImmutable.t.sol b/test/solidity/LiFiDiamondImmutable.t.sol index eb95103d9..41ee58d77 100644 --- a/test/solidity/LiFiDiamondImmutable.t.sol +++ b/test/solidity/LiFiDiamondImmutable.t.sol @@ -120,7 +120,8 @@ contract LiFiDiamondImmutableTest is DSTest { bytes memory callData = hex"a516f0f3"; // getPeripheryContract(string) vm.expectRevert(FunctionDoesNotExist.selector); - address(diamond).call(callData); + (bool success, ) = address(diamond).call(callData); + if (success) revert("ShouldNotReachThisCode"); } function test_CanReceiveETH() public {