Skip to content

Commit

Permalink
Add test_calculateL2TokenAddress_Registered
Browse files Browse the repository at this point in the history
  • Loading branch information
gvladika committed Feb 9, 2024
1 parent 3362b78 commit 6da2210
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test-foundry/L2CustomGateway.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ contract L2CustomGatewayTest is L2ArbitrumGatewayTest {
);
}

function test_calculateL2TokenAddress_Registered() public {
function test_calculateL2TokenAddress_Registered() public virtual {
address l2CustomToken = _registerToken();
assertEq(
l2CustomGateway.calculateL2TokenAddress(l1CustomToken),
Expand Down
9 changes: 9 additions & 0 deletions test-foundry/L2ReverseCustomGateway.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ contract L2ReverseCustomGatewayTest is L2CustomGatewayTest {
}

/* solhint-disable func-name-mixedcase */
function test_calculateL2TokenAddress_Registered() public override {
address l1CustomToken = _registerToken();
assertEq(
l2CustomGateway.calculateL2TokenAddress(l1CustomToken),
address(l2MintedToken),
"Invalid L2 token"
);
}

function test_finalizeInboundTransfer() public override {
// fund gateway with tokens being withdrawn
vm.prank(address(l2ReverseCustomGateway));
Expand Down

0 comments on commit 6da2210

Please sign in to comment.