From d8eea580eea537daac00ed43e0dbdc8b3f25b246 Mon Sep 17 00:00:00 2001 From: lightclient Date: Thu, 18 Jul 2024 07:34:21 -0600 Subject: [PATCH] test: update to use new cheatcode --- test/Consolidation.t.sol.in | 7 ++++--- test/Withdrawal.t.sol.in | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/Consolidation.t.sol.in b/test/Consolidation.t.sol.in index 9f50d25..eb251f5 100644 --- a/test/Consolidation.t.sol.in +++ b/test/Consolidation.t.sol.in @@ -33,17 +33,18 @@ contract ConsolidationTest is Test { function testConsolidation() public { bytes memory data = hex"111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222"; - vm.expectEmit(false, false, false, true); + vm.expectEmitAnonymous(false, false, false, false, true); assembly { let ptr := mload(0x40) mstore(ptr, shl(96, address())) mstore(add(ptr, 20), mload(add(data, 32))) mstore(add(ptr, 52), mload(add(data, 64))) - log0(ptr, 76) + mstore(add(ptr, 84), mload(add(data, 96))) + log0(ptr, 116) } (bool ret,) = addr.call{value: 2}(data); - assertEq(ret, true); + assertEq(ret, true, "call failed"); assertStorage(count_slot, 1, "unexpected request count"); assertExcess(0); diff --git a/test/Withdrawal.t.sol.in b/test/Withdrawal.t.sol.in index a7b5e93..1d65bfc 100644 --- a/test/Withdrawal.t.sol.in +++ b/test/Withdrawal.t.sol.in @@ -35,7 +35,7 @@ contract WithdrawalsTest is Test { function testWithdrawal() public { bytes memory data = hex"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222"; - vm.expectEmit(false, false, false, true); + vm.expectEmitAnonymous(false, false, false, false, true); assembly { let ptr := mload(0x40) mstore(ptr, shl(96, address()))