Skip to content

Commit

Permalink
chore: rm irrelevant test
Browse files Browse the repository at this point in the history
  • Loading branch information
xenide committed Jun 6, 2024
1 parent 8a1fcce commit d7e9111
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

24 changes: 0 additions & 24 deletions test/unit/libraries/QueryProcessor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -121,30 +121,6 @@ contract QueryProcessorTest is BaseTest {
assertGt(lAveragePrice, lEndingPrice);
}

function testGetTimeWeightedAverage_AccumulatorOverflow() external {
// arrange
uint256 lSecs = 600; // 10 minutes
skip(10);
_pair.sync(); // write first observation at index 0
uint32 lNow = uint32(block.timestamp);
_writeObservation(_pair, 0, 0, 0, type(int88).max, type(int88).max, lNow);

skip(lSecs);
_pair.sync(); // write second observation at index 1
(,,, uint16 lLatestIndex) = _pair.getReserves();
// sanity
assertEq(lLatestIndex, 1);
lNow = uint32(block.timestamp);
_writeObservation(_pair, 1, 0, 0, type(int88).min + 3000, type(int88).min + 3000, lNow);

// act
uint256 lAgo = 0;
uint256 lResult = _queryProcessor.getTimeWeightedAverage(_pair, Variable.RAW_PRICE, lSecs, lAgo, lLatestIndex);

// assert6
assertEq(lResult, 0);
}

function testGetPastAccumulator_ExactMatch(
uint32 aStartTime,
uint256 aBlockTime,
Expand Down

0 comments on commit d7e9111

Please sign in to comment.