Skip to content

Commit

Permalink
snapLastCall to all
Browse files Browse the repository at this point in the history
  • Loading branch information
Jun1on committed Jul 1, 2024
1 parent 9143f18 commit 261688e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .forge-snapshots/OracleGrow10Slots.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
254164
249167
2 changes: 1 addition & 1 deletion .forge-snapshots/OracleGrow10SlotsCardinalityGreater.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
249653
249167
2 changes: 1 addition & 1 deletion .forge-snapshots/OracleGrow1Slot.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
54049
49052
2 changes: 1 addition & 1 deletion .forge-snapshots/OracleGrow1SlotCardinalityGreater.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
49549
49052
12 changes: 4 additions & 8 deletions test/Oracle.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -89,29 +89,25 @@ contract TestOracle is Test, GasSnapshot {
}

function testGas1Slot() public {
snapStart("OracleGrow1Slot");
initializedOracle.grow(2);
snapEnd();
snapLastCall("OracleGrow1Slot");
}

function testGas10Slots() public {
snapStart("OracleGrow10Slots");
initializedOracle.grow(11);
snapEnd();
snapLastCall("OracleGrow10Slots");
}

function testGas1SlotCardinalityGreater() public {
initializedOracle.grow(2);
snapStart("OracleGrow1SlotCardinalityGreater");
initializedOracle.grow(3);
snapEnd();
snapLastCall("OracleGrow1SlotCardinalityGreater");
}

function testGas10SlotCardinalityGreater() public {
initializedOracle.grow(2);
snapStart("OracleGrow10SlotsCardinalityGreater");
initializedOracle.grow(12);
snapEnd();
snapLastCall("OracleGrow10SlotsCardinalityGreater");
}

function testWrite() public {
Expand Down

0 comments on commit 261688e

Please sign in to comment.