Skip to content

Commit

Permalink
reorder code for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
alex0207s committed Jan 2, 2025
1 parent d9d2018 commit 67be7cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/forkMainnet/LimitOrderSwap/CancelOrder.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ contract CancelOrderTest is LimitOrderSwapTest {
}

function testCannotCancelOrderIfNotMaker() public {
vm.expectRevert(ILimitOrderSwap.NotOrderMaker.selector);
vm.startPrank(taker);
vm.expectRevert(ILimitOrderSwap.NotOrderMaker.selector);
limitOrderSwap.cancelOrder(defaultOrder);
vm.stopPrank();
}

function testCannotCancelExpiredOrder() public {
vm.warp(defaultOrder.expiry + 1);

vm.expectRevert(ILimitOrderSwap.ExpiredOrder.selector);
vm.startPrank(maker);
vm.expectRevert(ILimitOrderSwap.ExpiredOrder.selector);
limitOrderSwap.cancelOrder(defaultOrder);
vm.stopPrank();
}
Expand All @@ -39,8 +39,8 @@ contract CancelOrderTest is LimitOrderSwapTest {
limitOrderSwap.fillLimitOrder({ order: defaultOrder, makerSignature: defaultMakerSig, takerParams: defaultTakerParams });
vm.stopPrank();

vm.expectRevert(ILimitOrderSwap.FilledOrder.selector);
vm.startPrank(maker);
vm.expectRevert(ILimitOrderSwap.FilledOrder.selector);
limitOrderSwap.cancelOrder(defaultOrder);
vm.stopPrank();
}
Expand All @@ -50,8 +50,8 @@ contract CancelOrderTest is LimitOrderSwapTest {
limitOrderSwap.cancelOrder(defaultOrder);
vm.stopPrank();

vm.expectRevert(ILimitOrderSwap.CanceledOrder.selector);
vm.startPrank(maker);
vm.expectRevert(ILimitOrderSwap.CanceledOrder.selector);
limitOrderSwap.cancelOrder(defaultOrder);
vm.stopPrank();
}
Expand Down

0 comments on commit 67be7cc

Please sign in to comment.