Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
wcgcyx committed Nov 13, 2023
1 parent c4b0252 commit 17ab7d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions test/unit/child/ChildERC20Bridge.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ contract ChildERC20BridgeUnitTest is Test, IChildERC20BridgeEvents, IChildERC20B
});

vm.expectRevert(ZeroAddress.selector);
bridge.initialize(roles, address(0), ROOT_BRIDGE_ADAPTOR, address(1), ROOT_CHAIN_NAME, address(1));
bridge.initialize(roles, address(1), ROOT_BRIDGE_ADAPTOR, address(1), ROOT_CHAIN_NAME, address(1));
}

function test_RevertIf_InitializeWithAZeroAddressPauser() public {
Expand All @@ -96,7 +96,7 @@ contract ChildERC20BridgeUnitTest is Test, IChildERC20BridgeEvents, IChildERC20B
});

vm.expectRevert(ZeroAddress.selector);
bridge.initialize(roles, address(0), ROOT_BRIDGE_ADAPTOR, address(1), ROOT_CHAIN_NAME, address(1));
bridge.initialize(roles, address(1), ROOT_BRIDGE_ADAPTOR, address(1), ROOT_CHAIN_NAME, address(1));
}

function test_RevertIf_InitializeWithAZeroAddressUnpauser() public {
Expand All @@ -110,7 +110,7 @@ contract ChildERC20BridgeUnitTest is Test, IChildERC20BridgeEvents, IChildERC20B
});

vm.expectRevert(ZeroAddress.selector);
bridge.initialize(roles, address(0), ROOT_BRIDGE_ADAPTOR, address(1), ROOT_CHAIN_NAME, address(1));
bridge.initialize(roles, address(1), ROOT_BRIDGE_ADAPTOR, address(1), ROOT_CHAIN_NAME, address(1));
}

function test_RevertIf_InitializeWithAZeroAddressVariableManager() public {
Expand All @@ -124,7 +124,7 @@ contract ChildERC20BridgeUnitTest is Test, IChildERC20BridgeEvents, IChildERC20B
});

vm.expectRevert(ZeroAddress.selector);
bridge.initialize(roles, address(0), ROOT_BRIDGE_ADAPTOR, address(1), ROOT_CHAIN_NAME, address(1));
bridge.initialize(roles, address(1), ROOT_BRIDGE_ADAPTOR, address(1), ROOT_CHAIN_NAME, address(1));
}

function test_RevertIf_InitializeWithAZeroAddressAdaptorManager() public {
Expand All @@ -138,7 +138,7 @@ contract ChildERC20BridgeUnitTest is Test, IChildERC20BridgeEvents, IChildERC20B
});

vm.expectRevert(ZeroAddress.selector);
bridge.initialize(roles, address(0), ROOT_BRIDGE_ADAPTOR, address(1), ROOT_CHAIN_NAME, address(1));
bridge.initialize(roles, address(1), ROOT_BRIDGE_ADAPTOR, address(1), ROOT_CHAIN_NAME, address(1));
}

function test_RevertIf_InitializeWithAZeroAddressAdapter() public {
Expand Down
4 changes: 3 additions & 1 deletion test/unit/root/RootERC20Bridge.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,9 @@ contract RootERC20BridgeUnitTest is Test, IRootERC20BridgeEvents, IRootERC20Brid

function test_RevertIf_updateRootBridgeAdaptorCalledByNonOwner() public {
vm.prank(address(0xf00f00));
vm.expectRevert(NotVariableManager.selector);
vm.expectRevert(
abi.encodeWithSelector(NotVariableManager.selector, 0xf00f00)
);
rootBridge.updateRootBridgeAdaptor(address(0x11111));
}

Expand Down

0 comments on commit 17ab7d4

Please sign in to comment.