Skip to content

Commit

Permalink
pop & delete tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rachel-bousfield committed Aug 11, 2023
1 parent d53ad03 commit c86ee1c
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions src/mocks/SdkStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ contract SdkStorage {
for (uint8 i = 0; i < 31; i++) {
bytesFull = abi.encodePacked(bytesFull, i);
}
for (uint8 i = 0; i < 34; i++) {
for (uint8 i = 0; i < 80; i++) {
bytesLong = abi.encodePacked(bytesLong, i);
}
chars = "arbitrum stylus";
Expand Down Expand Up @@ -92,5 +92,32 @@ contract SdkStorage {
}
}

function remove() external {}
function remove() external {
while (bytesFull.length != 0) {
bytesFull.pop();
}

while (bytesLong.length > 16) {
bytesLong.pop();
}

chars = "wasm is cute <3";

while (vector.length != 0) {
vector.pop();
}

while (nested.length > 1) {
nested.pop();
}

for (uint256 i = 0; i < 8; i++) {
delete maps.basic[i];
}
maps.basic[8] = address(32);

for (uint160 i = 0; i < 4; i++) {
delete maps.vects[address(i)];
}
}
}

0 comments on commit c86ee1c

Please sign in to comment.