Skip to content

Commit d616fda

Browse files
committed
fix tests
1 parent 1b2679a commit d616fda

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: test/utils/Memory.t.sol

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ import {Memory} from "@openzeppelin/contracts/utils/Memory.sol";
88
contract MemoryTest is Test {
99
using Memory for *;
1010

11-
function testSymbolicGetSetFreePointer(bytes32 ptr) public {
11+
function testSymbolicGetSetFreePointer(uint256 seed) public {
12+
// - first 0x80 bytes are reserved (scratch + FMP + zero)
13+
// - moving the free memory pointer to far causes OOG errors
14+
bytes32 ptr = bytes32(bound(seed, 0x80, type(uint24).max));
15+
1216
Memory.setFreePointer(ptr.asPointer());
1317
assertEq(Memory.getFreePointer().asBytes32(), ptr);
1418
}

0 commit comments

Comments
 (0)