-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #448 from superform-xyz/coverage-improvements
chore: cover all uncovered lines
- Loading branch information
Showing
6 changed files
with
169 additions
and
1 deletion.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
test/unit/crosschain-data/adapters/HyperlaneImplementation.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-License-Identifier: Unlicense | ||
pragma solidity ^0.8.23; | ||
|
||
import "../../../utils/BaseSetup.sol"; | ||
|
||
import { ISuperRegistry } from "src/interfaces/ISuperRegistry.sol"; | ||
import { HyperlaneImplementation } from "src/crosschain-data/adapters/hyperlane/HyperlaneImplementation.sol"; | ||
import { Error } from "src/libraries/Error.sol"; | ||
|
||
contract HyperlaneImplementationUnitTest is BaseSetup { | ||
HyperlaneImplementation hyperlaneImplementation; | ||
|
||
function setUp() public override { | ||
super.setUp(); | ||
|
||
ISuperRegistry superRegistry = ISuperRegistry(getContract(ETH, "SuperRegistry")); | ||
|
||
vm.selectFork(FORKS[ETH]); | ||
hyperlaneImplementation = HyperlaneImplementation(payable(superRegistry.getAmbAddress(2))); | ||
} | ||
|
||
function test_setHyperlaneConfig_ZERO_ADDRESS() public { | ||
vm.prank(deployer); | ||
vm.expectRevert(Error.ZERO_ADDRESS.selector); | ||
hyperlaneImplementation.setHyperlaneConfig(IMailbox(address(0)), IInterchainGasPaymaster(address(420))); | ||
|
||
vm.prank(deployer); | ||
vm.expectRevert(Error.ZERO_ADDRESS.selector); | ||
hyperlaneImplementation.setHyperlaneConfig(IMailbox(address(420)), IInterchainGasPaymaster(address(0))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters