More tests
This commit is contained in:
@@ -214,6 +214,7 @@ public abstract class Turret extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void targetPosition(Posc pos){
|
public void targetPosition(Posc pos){
|
||||||
|
if(!hasAmmo()) return;
|
||||||
BulletType bullet = peekAmmo();
|
BulletType bullet = peekAmmo();
|
||||||
float speed = bullet.speed;
|
float speed = bullet.speed;
|
||||||
//slow bullets never intersect
|
//slow bullets never intersect
|
||||||
|
|||||||
@@ -424,6 +424,15 @@ public class ApplicationTests{
|
|||||||
assertEquals(300, world.height());
|
assertEquals(300, world.height());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void load108Save(){
|
||||||
|
resetWorld();
|
||||||
|
SaveIO.load(Core.files.internal("108.msav"));
|
||||||
|
|
||||||
|
assertEquals(256, world.width());
|
||||||
|
assertEquals(256, world.height());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void arrayIterators(){
|
void arrayIterators(){
|
||||||
Seq<String> arr = Seq.with("a", "b" , "c", "d", "e", "f");
|
Seq<String> arr = Seq.with("a", "b" , "c", "d", "e", "f");
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ public class PowerTestFixture{
|
|||||||
headless = true;
|
headless = true;
|
||||||
Core.graphics = new FakeGraphics();
|
Core.graphics = new FakeGraphics();
|
||||||
Core.files = new MockFiles();
|
Core.files = new MockFiles();
|
||||||
Vars.state = new GameState();
|
|
||||||
Vars.tree = new FileTree();
|
|
||||||
Vars.content = new ContentLoader(){
|
Vars.content = new ContentLoader(){
|
||||||
@Override
|
@Override
|
||||||
public void handleMappableContent(MappableContent content){
|
public void handleMappableContent(MappableContent content){
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Vars.state = new GameState();
|
||||||
|
Vars.tree = new FileTree();
|
||||||
content.createBaseContent();
|
content.createBaseContent();
|
||||||
Log.setUseColors(false);
|
Log.setUseColors(false);
|
||||||
Time.setDeltaProvider(() -> 0.5f);
|
Time.setDeltaProvider(() -> 0.5f);
|
||||||
|
|||||||
BIN
tests/src/test/resources/108.msav
Normal file
BIN
tests/src/test/resources/108.msav
Normal file
Binary file not shown.
Reference in New Issue
Block a user