From 9a39be8b47193463f4311c76fc05be9842938e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Bl=C3=A4cker?= Date: Tue, 10 Sep 2024 08:48:02 +0700 Subject: [PATCH] silences compiler warnings --- test/solidity/LiFiDiamond.t.sol | 4 +++- test/solidity/LiFiDiamondImmutable.t.sol | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) 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 {