Merge pull request 'fix: testMomentumFullBearAtNegMaxDelta has no slot assertions (#1011)' (#1121) from fix/issue-1011 into master

This commit is contained in:
johba 2026-03-22 19:14:46 +01:00
commit 723476d4f6

View file

@ -626,6 +626,13 @@ contract OptimizerNormalizedInputsTest is Test {
mockPool.setTwapTicks(1000, 0); // longTwap=1000, shortTwap=0
optimizer.getLiquidityParams(); // must not revert
// Verify slots 3 (volatility) and 4 (momentum) via capture harness.
// Note: with token0isWeth=false, pool ticks are negated into KRK-price space.
// Pool shortTwap=0, longTwap=1000 KRK-space twapDelta = +1000 (max bull).
int256[8] memory m = capture.getComputedInputs();
assertEq(m[3], int256(1e18), "volatility should be 1e18 at max negative delta");
assertEq(m[4], int256(1e18), "momentum should be 1e18 (max bull in KRK-price space)");
}
function testObserveRevertLeavesSlots34AsZero() public {