Skip to content

Commit 4f9092b

Browse files
fix tests
1 parent 7c8137c commit 4f9092b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/src/lib/LibMemoryKV.storageParity.t.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-FileCopyrightText: Copyright (c) 2020 Rain Open Source Software Ltd
33
pragma solidity =0.8.25;
44

5-
import {Test} from "forge-std/Test.sol";
5+
import {Test, console2} from "forge-std/Test.sol";
66

77
import {LibMemoryKV, MemoryKV, MemoryKVKey, MemoryKVVal} from "src/lib/LibMemoryKV.sol";
88

@@ -55,7 +55,7 @@ contract LibMemoryKVStorageParityTest is Test {
5555
kv = LibMemoryKV.set(kv, MemoryKVKey.wrap(kvsOne[i].key), MemoryKVVal.wrap(kvsOne[i].value));
5656
}
5757
bytes32[] memory finalKVs = LibMemoryKV.toBytes32Array(kv);
58-
for (uint256 i = 0; i < endOne; i += 2) {
58+
for (uint256 i = 0; i < finalKVs.length; i += 2) {
5959
assertEq(sStorageKV[finalKVs[i]], finalKVs[i + 1], "storage");
6060
}
6161

@@ -66,7 +66,7 @@ contract LibMemoryKVStorageParityTest is Test {
6666
kvTwo = LibMemoryKV.set(kvTwo, MemoryKVKey.wrap(kvsTwo[i].key), MemoryKVVal.wrap(kvsTwo[i].value));
6767
}
6868
bytes32[] memory finalKVsTwo = LibMemoryKV.toBytes32Array(kvTwo);
69-
for (uint256 i = 0; i < endTwo; i += 2) {
69+
for (uint256 i = 0; i < finalKVsTwo.length; i += 2) {
7070
assertEq(sStorageKV[finalKVsTwo[i]], finalKVsTwo[i + 1], "storage");
7171
}
7272
}

0 commit comments

Comments
 (0)