Fixed tests
This commit is contained in:
@@ -29,8 +29,9 @@ public class DirectConsumerTests extends PowerTestFixture{
|
||||
testUnitFactory(30, 30, 0.08f, 0.08f, 1.0f);
|
||||
}
|
||||
|
||||
static int fakes = 0;
|
||||
void testUnitFactory(int siliconAmount, int leadAmount, float producedPower, float requestedPower, float expectedSatisfaction){
|
||||
Tile ct = createFakeTile(0, 0, new GenericCrafter("fakefactory"){{
|
||||
Tile ct = createFakeTile(0, 0, new GenericCrafter("fakefactory" + (fakes ++)){{
|
||||
hasPower = true;
|
||||
hasItems = true;
|
||||
consumePower(requestedPower);
|
||||
|
||||
@@ -6,7 +6,6 @@ import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.world.*;
|
||||
@@ -32,12 +31,7 @@ public class PowerTestFixture{
|
||||
boolean make = content == null;
|
||||
|
||||
if(make){
|
||||
Vars.content = new ContentLoader(){
|
||||
@Override
|
||||
public void handleMappableContent(MappableContent content){
|
||||
|
||||
}
|
||||
};
|
||||
Vars.content = new ContentLoader();
|
||||
}
|
||||
Vars.state = new GameState();
|
||||
Vars.tree = new FileTree();
|
||||
|
||||
Reference in New Issue
Block a user