Skip to content

Commit

Permalink
tests: Fix adding missing gas cap to OOG test case
Browse files Browse the repository at this point in the history
  • Loading branch information
pmerkleplant committed Jun 25, 2024
1 parent 43f1466 commit 92d9839
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/Aggor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ contract AggorTest is Test {
uint updatedAt;
uint80 answeredInRound;
(roundId, answer, startedAt, updatedAt, answeredInRound) =
aggor.latestRoundData();
aggor.latestRoundData{gas: gasUsage_latestRoundData}();
assertEq(roundId, 1);
assertEq(uint(answer), wantVal);
assertEq(startedAt, 0);
Expand All @@ -845,7 +845,7 @@ contract AggorTest is Test {
uint val;
uint age;
IAggor.Status memory status;
(val, age, status) = aggor.readWithStatus();
(val, age, status) = aggor.readWithStatus{gas: gasUsage_readWithStatus}();
assertEq(val, wantVal);
assertEq(age, wantAge);
assertEq(status.path, wantStatus.path);
Expand Down
6 changes: 3 additions & 3 deletions test/integration/AggorIntegration_eth_ETH_USD.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ contract AggorIntegrationTest_eth_ETH_USD is Test {
// optimizer_runs : 10_000
// via-ir : false
uint gasUsage = 9000;
while (gasUsage > 500) {
while (gasUsage != 0) {
try aggor.latestAnswer{gas: gasUsage}() returns (int answer) {
// Call returned, ie no OOG.
// Verify whether Chainlink call was executed.
Expand Down Expand Up @@ -296,7 +296,7 @@ contract AggorIntegrationTest_eth_ETH_USD is Test {
// optimizer_runs : 10_000
// via-ir : false
uint gasUsage = 10_000;
while (gasUsage > 500) {
while (gasUsage != 0) {
try aggor.latestRoundData{gas: gasUsage}() returns (
uint80, int answer, uint, uint, uint80
) {
Expand Down Expand Up @@ -347,7 +347,7 @@ contract AggorIntegrationTest_eth_ETH_USD is Test {
// optimizer_runs : 10_000
// via-ir : false
uint gasUsage = 10_000;
while (gasUsage > 500) {
while (gasUsage != 0) {
try aggor.readWithStatus{gas: gasUsage}() returns (
uint val, uint, IAggor.Status memory
) {
Expand Down

0 comments on commit 92d9839

Please sign in to comment.