Update forge and change visibility in fuzz tests (#5103)

Co-authored-by: cairo <cairoeth@protonmail.com>
This commit is contained in:
Ernesto García
2024-10-28 10:33:25 -06:00
committed by GitHub
parent bcdfa848a6
commit f96237308f
16 changed files with 74 additions and 70 deletions

View File

@ -7,12 +7,12 @@ import {SymTest} from "halmos-cheatcodes/SymTest.sol";
import {Arrays} from "@openzeppelin/contracts/utils/Arrays.sol";
contract ArraysTest is Test, SymTest {
function testSort(uint256[] memory values) public {
function testSort(uint256[] memory values) public pure {
Arrays.sort(values);
_assertSort(values);
}
function symbolicSort() public {
function symbolicSort() public pure {
uint256[] memory values = new uint256[](3);
for (uint256 i = 0; i < 3; i++) {
values[i] = svm.createUint256("arrayElement");
@ -23,7 +23,7 @@ contract ArraysTest is Test, SymTest {
/// Asserts
function _assertSort(uint256[] memory values) internal {
function _assertSort(uint256[] memory values) internal pure {
for (uint256 i = 1; i < values.length; ++i) {
assertLe(values[i - 1], values[i]);
}