Skip to content

Commit 8e9b07c

Browse files
committed
tweak rollup tests for inheritability
1 parent 0fd4ad2 commit 8e9b07c

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

test/Orders.t.sol

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ contract OrdersTest is Test {
1515
IOrders.Input[] public inputs;
1616
IOrders.Output[] public outputs;
1717

18-
mapping(address => bool) isToken;
19-
2018
address token;
19+
address token2;
2120
uint32 chainId = 3;
2221
address recipient = address(0x123);
2322
uint256 amount = 200;
@@ -29,16 +28,20 @@ contract OrdersTest is Test {
2928

3029
event Sweep(address indexed recipient, address indexed token, uint256 amount);
3130

32-
function setUp() public {
31+
function setUp() public virtual {
3332
target = new RollupOrders(address(0));
3433

3534
// setup token
3635
token = address(new TestERC20("hi", "HI"));
3736
TestERC20(token).mint(address(this), amount * 10000);
3837
TestERC20(token).approve(address(target), amount * 10000);
39-
isToken[token] = true;
4038

41-
// setup Order Inputs/Outputs
39+
// setup second token
40+
token2 = address(new TestERC20("bye", "BYE"));
41+
TestERC20(token2).mint(address(this), amount * 10000);
42+
TestERC20(token2).approve(address(target), amount * 10000);
43+
44+
// setup simple Order Inputs/Outputs
4245
IOrders.Input memory input = IOrders.Input(token, amount);
4346
inputs.push(input);
4447

@@ -90,11 +93,6 @@ contract OrdersTest is Test {
9093

9194
// input multiple ERC20s
9295
function test_initiate_multiERC20() public {
93-
// setup second token
94-
address token2 = address(new TestERC20("bye", "BYE"));
95-
TestERC20(token2).mint(address(this), amount * 10000);
96-
TestERC20(token2).approve(address(target), amount * 10000);
97-
9896
// add second token input
9997
inputs.push(IOrders.Input(token2, amount * 2));
10098

test/Passage.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ contract RollupPassageTest is Test {
177177

178178
event ExitToken(address indexed hostRecipient, address indexed token, uint256 amount);
179179

180-
function setUp() public {
180+
function setUp() public virtual {
181181
// deploy target
182182
target = new RollupPassage(address(0));
183183

0 commit comments

Comments
 (0)