Skip to content

Commit

Permalink
Resolve fuzzing test failures for AddressSortedLinkedListWithMedian (#…
Browse files Browse the repository at this point in the history
…277)

* Ignore AddressSortedLinkedList and AddressSortedLinkedListWithMedian as targets in fuzzing test of SafeCall_Test

* Format test/libraries/SafeCall.t.sol
  • Loading branch information
Kourin1996 authored Dec 9, 2024
1 parent 4bd372a commit fd44a81
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/contracts-bedrock/test/libraries/SafeCall.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ pragma solidity 0.8.15;
// Testing utilities
import { Test } from "forge-std/Test.sol";
import { StdCheatsSafe } from "forge-std/StdCheats.sol";
import { AddressSortedLinkedList } from "src/celo/common/linkedlists/AddressSortedLinkedList.sol";
import { AddressSortedLinkedListWithMedian } from "src/celo/common/linkedlists/AddressSortedLinkedListWithMedian.sol";

// Target contract
import { SafeCall } from "src/libraries/SafeCall.sol";
Expand All @@ -14,7 +16,10 @@ contract SafeCall_Test is Test {
vm.assume(_addr.balance == 0);
vm.assume(_addr != address(this));
vm.assume(uint256(uint160(_addr)) > uint256(256)); // TODO temp fix until new forge-std release with modern
// precompiles: https://github.com/foundry-rs/forge-std/pull/594
// ignore address of library contract whose functions have 'public' or 'external' visibilities
vm.assume(_addr != address(AddressSortedLinkedList));
vm.assume(_addr != address(AddressSortedLinkedListWithMedian));
// precompiles: https://github.com/foundry-rs/forge-std/pull/594
assumeAddressIsNot(_addr, StdCheatsSafe.AddressType.ForgeAddress, StdCheatsSafe.AddressType.Precompile);
}

Expand Down

0 comments on commit fd44a81

Please sign in to comment.