Skip to content

Commit

Permalink
Merge branch 'main' into flip-the-deltas
Browse files Browse the repository at this point in the history
  • Loading branch information
hensha256 committed Feb 29, 2024
2 parents ba1494d + 6f5f3f2 commit 0f19c28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/libraries/NonZeroDeltaCount.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ library NonZeroDeltaCount {
}

/// @notice Potential to underflow.
/// Current usage ensures this will not happen because we call decrememnt with known boundaries (only up to the number of times we call increment).
/// Current usage ensures this will not happen because we call decrement with known boundaries (only up to the number of times we call increment).
function decrement() internal {
uint256 slot = NONZERO_DELTA_COUNT;
assembly {
Expand Down
6 changes: 3 additions & 3 deletions test/Locker.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ contract LockerTest is Test {
address constant ADDRESS_AS = 0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa;
address constant ADDRESS_BS = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB;

function test_setLocker(address locker) public {
function test_fuzz_setLocker(address locker) public {
assertEq(address(Locker.getLocker()), address(0));

if (locker == address(0)) {
Expand All @@ -20,7 +20,7 @@ contract LockerTest is Test {
}
}

function test_clearLocker(address locker) public {
function test_fuzz_clearLocker(address locker) public {
vm.assume(locker != address(0));
Locker.setLocker(locker);

Expand All @@ -31,7 +31,7 @@ contract LockerTest is Test {
assertEq(address(Locker.getLocker()), address(0));
}

function test_isLocked(address locker) public {
function test_fuzz_isLocked(address locker) public {
vm.assume(locker != address(0));
assertFalse(Locker.isLocked());

Expand Down
2 changes: 1 addition & 1 deletion test/NonZeroDeltaCount.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract NonZeroDeltaCountTest is Test {

// Reading from right to left. Bit of 0: call increase. Bit of 1: call decrease.
// The library allows over over/underflow so we dont check for that here
function test_nonZeroDeltaCount_fuzz(uint256 instructions) public {
function test_fuzz_nonZeroDeltaCount(uint256 instructions) public {
uint256 expectedCount;
for (uint256 i = 0; i < 256; i++) {
if ((instructions & (1 << i)) == 0) {
Expand Down

0 comments on commit 0f19c28

Please sign in to comment.