Skip to content

Commit

Permalink
split PingPong.plumbing.t.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
0xsuryansh committed Nov 11, 2024
1 parent 0419cc2 commit ca63592
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 53 deletions.
4 changes: 2 additions & 2 deletions contracts/gas-snapshots/ccip.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,8 @@ OnRamp_setDynamicConfig:test_setDynamicConfig_InvalidConfigReentrancyGuardEntere
OnRamp_setDynamicConfig:test_setDynamicConfig_Success() (gas: 56440)
OnRamp_withdrawFeeTokens:test_WithdrawFeeTokens_Success() (gas: 125867)
PingPong_ccipReceive:test_CcipReceive_Success() (gas: 172841)
PingPong_plumbing:test_OutOfOrderExecution_Success() (gas: 20283)
PingPong_plumbing:test_Pausing_Success() (gas: 17738)
PingPong_setOutOfOrderExecution:test_OutOfOrderExecution_Success() (gas: 20283)
PingPong_setPaused:test_Pausing_Success() (gas: 17738)
PingPong_startPingPong:test_StartPingPong_With_OOO_Success() (gas: 151954)
PingPong_startPingPong:test_StartPingPong_With_Sequenced_Ordered_Success() (gas: 177569)
RMNHome_getConfigDigests:test_getConfigDigests_success() (gas: 1079685)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.24;

import {PingPongDappSetup} from "./PingPongDappSetup.t.sol";

contract PingPong_setCounterpart is PingPongDappSetup {
function test_Fuzz_CounterPartAddress_Success(uint64 chainSelector, address counterpartAddress) public {
s_pingPong.setCounterpartChainSelector(chainSelector);

s_pingPong.setCounterpart(chainSelector, counterpartAddress);

assertEq(s_pingPong.getCounterpartAddress(), counterpartAddress);
assertEq(s_pingPong.getCounterpartChainSelector(), chainSelector);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.24;

import {PingPongDappSetup} from "./PingPongDappSetup.t.sol";

contract PingPong_setCounterpartAddress is PingPongDappSetup {
function test_Fuzz_CounterPartAddress_Success(
address counterpartAddress
) public {
s_pingPong.setCounterpartAddress(counterpartAddress);

assertEq(s_pingPong.getCounterpartAddress(), counterpartAddress);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.24;

import {PingPongDappSetup} from "./PingPongDappSetup.t.sol";

contract PingPong_setCounterpartChainSelector is PingPongDappSetup {
function test_Fuzz_CounterPartChainSelector_Success(
uint64 chainSelector
) public {
s_pingPong.setCounterpartChainSelector(chainSelector);

assertEq(s_pingPong.getCounterpartChainSelector(), chainSelector);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.24;

import {PingPongDemo} from "../../../applications/PingPongDemo.sol";
import {PingPongDappSetup} from "./PingPongDappSetup.t.sol";

contract PingPong_setOutOfOrderExecution is PingPongDappSetup {
function test_OutOfOrderExecution_Success() public {
assertFalse(s_pingPong.getOutOfOrderExecution());

vm.expectEmit();
emit PingPongDemo.OutOfOrderExecutionChange(true);

s_pingPong.setOutOfOrderExecution(true);

assertTrue(s_pingPong.getOutOfOrderExecution());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.24;

import {PingPongDappSetup} from "./PingPongDappSetup.t.sol";

contract PingPong_setPaused is PingPongDappSetup {
function test_Pausing_Success() public {
assertFalse(s_pingPong.isPaused());

s_pingPong.setPaused(true);

assertTrue(s_pingPong.isPaused());
}
}

0 comments on commit ca63592

Please sign in to comment.