Skip to content

Commit 2d402b9

Browse files
authoredFeb 22, 2025
ci: Fix call didn't revert at a lower depth than cheatcode call depth forge error in EVM tests (#591)
This PR fixes this by adding `/// forge-config: default.allow_internal_expect_revert = true` above the test function.
1 parent 3311787 commit 2d402b9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎evm/test/TrimmedAmount.t.sol

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ contract TrimmingTest is Test {
6767
}
6868
}
6969

70+
/// forge-config: default.allow_internal_expect_revert = true
7071
function testAddOperatorDecimalsNotEqualRevert() public {
7172
uint8 decimals = 18;
7273
uint8 decimalsOther = 3;
@@ -134,6 +135,7 @@ contract TrimmingTest is Test {
134135
}
135136
}
136137

138+
/// forge-config: default.allow_internal_expect_revert = true
137139
function testSubOperatorOverflow() public {
138140
uint8[2] memory decimals = [18, 3];
139141

@@ -263,6 +265,7 @@ contract TrimmingTest is Test {
263265
assertEq(expectedTrimmedSub.getDecimals(), trimmedSub.getDecimals());
264266
}
265267

268+
/// forge-config: default.allow_internal_expect_revert = true
266269
function testFuzz_SubOperatorWillOverflow(
267270
uint8 decimals,
268271
uint256 amtLeft,

0 commit comments

Comments
 (0)