diff --git a/packages/contracts-bedrock/test/L2/LiquidityController.t.sol b/packages/contracts-bedrock/test/L2/LiquidityController.t.sol index 457dd3be165..43704367d04 100644 --- a/packages/contracts-bedrock/test/L2/LiquidityController.t.sol +++ b/packages/contracts-bedrock/test/L2/LiquidityController.t.sol @@ -45,26 +45,39 @@ contract LiquidityController_TestInit is CommonTest { skipIfDevFeatureDisabled(DevFeatures.CUSTOM_GAS_TOKEN); } - /// @notice Tests that contract version is set correctly. - function test_setup_version_succeeds() public view { - assertTrue(bytes(liquidityController.version()).length > 0); + /// @notice Helper function to authorize a minter. + function _authorizeMinter(address _minter) internal { + // Authorize the minter + stdstore.target(address(liquidityController)).sig(liquidityController.minters.selector).with_key(_minter) + .checked_write(true); } +} - /// @notice Tests that gas paying token name is set correctly. - function test_setup_gasPayingTokenName_succeeds() public view { - assertTrue(bytes(liquidityController.gasPayingTokenName()).length > 0); +/// @title LiquidityController_Version_Test +/// @notice Tests the `version` function of the `LiquidityController` contract. +contract LiquidityController_Version_Test is LiquidityController_TestInit { + /// @notice Tests that the version function returns a valid string. + function test_version_succeeds() public view { + assert(bytes(liquidityController.version()).length > 0); } +} - /// @notice Tests that gas paying token symbol is set correctly. - function test_setup_gasPayingTokenSymbol_succeeds() public view { - assertTrue(bytes(liquidityController.gasPayingTokenSymbol()).length > 0); +/// @title LiquidityController_GasPayingTokenName_Test +/// @notice Tests the `gasPayingTokenName` function of the `LiquidityController` contract. +contract LiquidityController_GasPayingTokenName_Test is LiquidityController_TestInit { + /// @notice Tests that the `version` function returns the correct string. We avoid testing the + /// specific value of the string as it changes frequently. + function test_gasPayingTokenName_succeeds() public view { + assertTrue(bytes(liquidityController.gasPayingTokenName()).length > 0); } +} - /// @notice Helper function to authorize a minter. - function _authorizeMinter(address _minter) internal { - // Authorize the minter - stdstore.target(address(liquidityController)).sig(liquidityController.minters.selector).with_key(_minter) - .checked_write(true); +/// @title LiquidityController_GasPayingTokenSymbol_Test +/// @notice Tests the `gasPayingTokenSymbol` function of the `LiquidityController` contract. +contract LiquidityController_GasPayingTokenSymbol_Test is LiquidityController_TestInit { + /// @notice Tests that the gasPayingTokenSymbol function returns a valid string. + function test_gasPayingTokenSymbol_succeeds() public view { + assertTrue(bytes(liquidityController.gasPayingTokenSymbol()).length > 0); } } diff --git a/packages/contracts-bedrock/test/L2/NativeAssetLiquidity.t.sol b/packages/contracts-bedrock/test/L2/NativeAssetLiquidity.t.sol index 57b62f87dd0..2b5869b5565 100644 --- a/packages/contracts-bedrock/test/L2/NativeAssetLiquidity.t.sol +++ b/packages/contracts-bedrock/test/L2/NativeAssetLiquidity.t.sol @@ -25,11 +25,15 @@ contract NativeAssetLiquidity_TestInit is CommonTest { super.setUp(); skipIfDevFeatureDisabled(DevFeatures.CUSTOM_GAS_TOKEN); } +} - /// @notice Tests that contract is set up correctly. - function test_setup_version_succeeds() public view { - // Assert - assertTrue(bytes(nativeAssetLiquidity.version()).length > 0); +/// @title NativeAssetLiquidity_Version_Test +/// @notice Tests the `version` function of the `NativeAssetLiquidity` contract. +contract NativeAssetLiquidity_Version_Test is NativeAssetLiquidity_TestInit { + /// @notice Tests that the `version` function returns the correct string. We avoid testing the + /// specific value of the string as it changes frequently. + function test_version_succeeds() public view { + assert(bytes(nativeAssetLiquidity.version()).length > 0); } }