Skip to content

Commit

Permalink
refactor: zero value tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hexshire committed Jul 8, 2024
1 parent 54a75a9 commit c2a2f09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/unit/L1OpUSDCBridgeAdapter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ contract L1OpUSDCBridgeAdapter_Unit_MigrateToNative is Base {
address _burnCaller
) external {
vm.assume(_burnCaller != address(0));
address _roleCaller = address(0);
// Execute
vm.prank(_owner);
vm.expectRevert(abi.encodeWithSelector(IOpUSDCBridgeAdapter.IOpUSDCBridgeAdapter_InvalidAddress.selector));
adapter.migrateToNative(address(0), _burnCaller, _minGasLimitReceiveOnL2, _minGasLimitSetBurnAmount);
adapter.migrateToNative(_roleCaller, _burnCaller, _minGasLimitReceiveOnL2, _minGasLimitSetBurnAmount);
}

/**
Expand All @@ -111,10 +112,11 @@ contract L1OpUSDCBridgeAdapter_Unit_MigrateToNative is Base {
address _roleCaller
) external {
vm.assume(_roleCaller != address(0));
address _burnCaller = address(0);
// Execute
vm.prank(_owner);
vm.expectRevert(abi.encodeWithSelector(IOpUSDCBridgeAdapter.IOpUSDCBridgeAdapter_InvalidAddress.selector));
adapter.migrateToNative(_roleCaller, address(0), _minGasLimitReceiveOnL2, _minGasLimitSetBurnAmount);
adapter.migrateToNative(_roleCaller, _burnCaller, _minGasLimitReceiveOnL2, _minGasLimitSetBurnAmount);
}

/**
Expand Down

0 comments on commit c2a2f09

Please sign in to comment.