Skip to content

Commit

Permalink
Proper package formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dloe committed Sep 12, 2024
1 parent 673fe54 commit 4c6b54b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
3 changes: 1 addition & 2 deletions core/src/mindustry/world/Tile.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ public Tile(int x, int y, int floor, int overlay, int wall){
public Tile() { block = floor = overlay = (Floor)Blocks.air; }

/** Mocking scenarios in test suites. */
public void constructTile(Tile tile)
{
public void constructTile(Tile tile){
this.x = tile.x;
this.y = tile.y;
this.floor = tile.floor;
Expand Down
3 changes: 1 addition & 2 deletions core/src/mindustry/world/blocks/liquid/Conduit.java
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ public void updateTile(){
}

/** Using in test suite for updating optimal liquid flow for testing purposes. */
public void updateTileDummyFlow()
{
public void updateTileDummyFlow(){
smoothLiquid = Mathf.lerpDelta(smoothLiquid, liquids.currentAmount() / liquidCapacity, 0.05f);

if(liquids.currentAmount() > 0.0001f && timer(timerFlow, 1)){
Expand Down
8 changes: 4 additions & 4 deletions tests/src/test/java/ApplicationTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import mindustry.entities.units.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.graphics.g3d.PlanetGrid;
import mindustry.graphics.g3d.*;
import mindustry.io.*;
import mindustry.io.SaveIO.*;
import mindustry.maps.*;
Expand All @@ -25,17 +25,17 @@
import mindustry.net.Packets.*;
import mindustry.type.*;
import mindustry.world.*;
import mindustry.world.blocks.liquid.Conduit;
import mindustry.world.blocks.liquid.*;
import mindustry.world.blocks.payloads.*;
import mindustry.world.blocks.storage.*;
import mindustry.world.blocks.defense.turrets.*;
import mindustry.world.blocks.environment.Floor;
import mindustry.world.blocks.storage.CoreBlock.CoreBuild;
import mindustry.world.blocks.storage.CoreBlock.*;
import org.json.*;
import org.junit.jupiter.api.*;
import org.junit.jupiter.params.*;
import org.junit.jupiter.params.provider.*;
import org.mockito.Mockito;
import org.mockito.*;

import java.io.*;
import java.nio.*;
Expand Down
10 changes: 4 additions & 6 deletions tests/src/test/java/power/DirectConsumerTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import mindustry.world.blocks.power.*;
import mindustry.world.blocks.production.*;
import org.junit.jupiter.api.*;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
import org.junit.jupiter.params.*;
import org.junit.jupiter.params.provider.*;

import static org.junit.jupiter.api.Assertions.*;

Expand All @@ -21,8 +21,7 @@ public class DirectConsumerTests extends PowerTestFixture{
*/
@ParameterizedTest
@CsvSource({"0, 0, 0.08f, 0.08f, 1f", "0, 0, 0.08f, 0.08f, 1f", "0, 0, 0.08f, 0.08f, 1f"})
public void noPowerRequestedWithNoItemsParameterized2(int siliconAmount, int leadAmount, float producedPower, float requestedPower, float expectedSatisfaction)
{
public void noPowerRequestedWithNoItemsParameterized2(int siliconAmount, int leadAmount, float producedPower, float requestedPower, float expectedSatisfaction){
testUnitFactory(siliconAmount, leadAmount, producedPower,requestedPower, expectedSatisfaction);
}

Expand Down Expand Up @@ -50,8 +49,7 @@ void noPowerRequestedWithNoItems(){
@ParameterizedTest
@CsvSource({"30, 30, 0.1f, 0.25f, 0.4f", "0, 0, 0.1f, 0.25f, 0.4f", "2, 0, 0.1f, 0.25f, 0.4f", "0, 15, 0.1f, 0.8f, 0.125f",
"90, 0, 0.8f, 0.8f, 1f", "0, 90, 0.8f, 0.8f, 1f", "12000, 0, 0.5f, 1.0f, 0.5f", "0, 12000, 0.4f, 0.8f, 0.5f"})
void noPowerRequestedSufficiencyParameterized(int siliconAmount, int leadAmount, float producedPower, float requestedPower, float expectedSatisfaction)
{
void noPowerRequestedSufficiencyParameterized(int siliconAmount, int leadAmount, float producedPower, float requestedPower, float expectedSatisfaction){
testUnitFactory(siliconAmount, leadAmount, producedPower,requestedPower, expectedSatisfaction);
}

Expand Down

0 comments on commit 4c6b54b

Please sign in to comment.