Skip to content

Commit cc74032

Browse files
committed
chore: fix test config to support forge v1
Signed-off-by: Tomás Migone <[email protected]>
1 parent 6460b84 commit cc74032

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/horizon/test/libraries/LinkedList.t.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ contract LinkedListTest is Test, ListImplementation {
1414
list = LinkedList.List({ head: bytes32(0), tail: bytes32(0), nonce: 0, count: 0 });
1515
}
1616

17+
/// forge-config: default.allow_internal_expect_revert = true
1718
function test_Add_RevertGiven_TheItemIdIsZero() external {
1819
vm.expectRevert(LinkedList.LinkedListInvalidZeroId.selector);
1920
list.addTail(bytes32(0));
@@ -31,6 +32,7 @@ contract LinkedListTest is Test, ListImplementation {
3132
_assert_addItem(_buildItemId(list.nonce), 1);
3233
}
3334

35+
/// forge-config: default.allow_internal_expect_revert = true
3436
function test_Add_RevertGiven_TheListIsAtMaxSize() external {
3537
for (uint256 i = 0; i < LinkedList.MAX_ITEMS; i++) {
3638
bytes32 id = _buildItemId(list.nonce);
@@ -41,6 +43,7 @@ contract LinkedListTest is Test, ListImplementation {
4143
list.addTail(_buildItemId(list.nonce));
4244
}
4345

46+
/// forge-config: default.allow_internal_expect_revert = true
4447
function test_Remove_RevertGiven_TheListIsEmpty() external {
4548
vm.expectRevert(LinkedList.LinkedListEmptyList.selector);
4649
list.removeHead(_getNextItem, _deleteItem);
@@ -82,6 +85,7 @@ contract LinkedListTest is Test, ListImplementation {
8285
_assert_traverseList(_processItemAddition, abi.encode(0), n, abi.encode(sum));
8386
}
8487

88+
/// forge-config: default.allow_internal_expect_revert = true
8589
function test_TraverseWhenIterationsAreInvalid() external givenTheListIsNotEmpty {
8690
uint256 n = LIST_LENGTH + 1;
8791
uint256 sum = 0;

packages/horizon/test/libraries/PPMMath.t.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ contract PPMMathTest is Test {
2929
assert(result == (value <= MAX_PPM));
3030
}
3131

32+
/// forge-config: default.allow_internal_expect_revert = true
3233
function test_mullPPM_RevertWhen_InvalidPPM(uint256 a, uint256 b) public {
3334
a = bound(a, MAX_PPM + 1, type(uint256).max);
3435
b = bound(b, MAX_PPM + 1, type(uint256).max);
@@ -37,6 +38,7 @@ contract PPMMathTest is Test {
3738
PPMMath.mulPPM(a, b);
3839
}
3940

41+
/// forge-config: default.allow_internal_expect_revert = true
4042
function test_mullPPMRoundUp_RevertWhen_InvalidPPM(uint256 a, uint256 b) public {
4143
b = bound(b, MAX_PPM + 1, type(uint256).max);
4244
bytes memory expectedError = abi.encodeWithSelector(PPMMath.PPMMathInvalidPPM.selector, b);

0 commit comments

Comments
 (0)