Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/contracts/test/Tablegen.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ contract TablegenTest is Test, StoreMock {
assertEq(Singleton.lengthV4, 1);
assertEq(Singleton.getItemV4(0), 5);
vm.expectRevert(abi.encodeWithSelector(IStoreErrors.Store_IndexOutOfBounds.selector, 4, 4));
assertEq(Singleton.getItemV4(1), 0);
Singleton.getItemV4(1);
}

function testOffchain() public {
Expand Down
5 changes: 2 additions & 3 deletions packages/store/test/StoreCoreDynamic.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock {
assertEq(length, thirdDataBytes.length);
}

/// forge-config: default.allow_internal_expect_revert = true
function testGetDynamicFieldSlice() public {
ResourceId tableId = _tableId;
bytes32[] memory keyTuple = _keyTuple;
Expand All @@ -234,10 +233,10 @@ contract StoreCoreDynamicTest is Test, GasReporter, StoreMock {
// Expect a revert if the end index is out of bounds
uint256 length = secondDataBytes.length;
vm.expectRevert(abi.encodeWithSelector(IStoreErrors.Store_IndexOutOfBounds.selector, length, length));
StoreCore.getDynamicFieldSlice(tableId, keyTuple, 0, 0, length + 1);
this.getDynamicFieldSlice(tableId, keyTuple, 0, 0, length + 1);

// Expect a revert if the start index is out of bounds
vm.expectRevert(abi.encodeWithSelector(IStoreErrors.Store_IndexOutOfBounds.selector, length, length));
StoreCore.getDynamicFieldSlice(tableId, keyTuple, 0, length, length);
this.getDynamicFieldSlice(tableId, keyTuple, 0, length, length);
}
}
3 changes: 1 addition & 2 deletions packages/store/test/StoreCoreGas.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock {
endGasReport();
}

/// forge-config: default.allow_internal_expect_revert = true
function testAccessEmptyData() public {
ResourceId tableId = _tableId;

Expand Down Expand Up @@ -629,7 +628,7 @@ contract StoreCoreGasTest is Test, GasReporter, StoreMock {
endGasReport();

vm.expectRevert(abi.encodeWithSelector(IStoreErrors.Store_IndexOutOfBounds.selector, 0, 0));
StoreCore.getDynamicFieldSlice(tableId, keyTuple, 0, 0, 0);
this.getDynamicFieldSlice(tableId, keyTuple, 0, 0, 0);
}

function testHooks() public {
Expand Down
2 changes: 0 additions & 2 deletions packages/world/test/AccessControl.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ contract AccessControlTest is Test, GasReporter, StoreMock {
vm.expectRevert(
abi.encodeWithSelector(IWorldErrors.World_AccessDenied.selector, tableId.toString(), address(this))
);
startGasReport("AccessControl: requireAccess (this address)");
AccessControl.requireAccess(tableId, address(this));
endGasReport();
}

/// forge-config: default.allow_internal_expect_revert = true
Expand Down
Loading