diff --git a/.travis.yml b/.travis.yml index dab863c1..4ba477fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,10 +24,7 @@ cache: - $HOME/.android/build-cache script: -- "./gradlew test" - - #curl https://github.com/ojdkbuild/ojdkbuild/releases/download/java-1.8.0-openjdk-1.8.0.232-1.b09/java-1.8.0-openjdk-1.8.0.232-1.b09.ojdkbuild.windows.x86_64.zip -o jdk-windows.zip - +- ./gradlew test - if [ -n "$TRAVIS_TAG" ]; then wget -O jdk-windows.zip https://github.com/ojdkbuild/ojdkbuild/releases/download/java-1.8.0-openjdk-1.8.0.232-1.b09/java-1.8.0-openjdk-1.8.0.232-1.b09.ojdkbuild.windows.x86_64.zip; ./gradlew desktop:packrWindows32; diff --git a/android/assets/jsons/Translations/Units,Promotions.json b/android/assets/jsons/Translations/Units,Promotions.json index 1b1c253e..8ff8e130 100644 --- a/android/assets/jsons/Translations/Units,Promotions.json +++ b/android/assets/jsons/Translations/Units,Promotions.json @@ -1641,7 +1641,7 @@ French:"Panzer" Czech:"Panzer" Polish:"Panzer" - Portuguese:"Tanque-Panzer' // to differ from 'Tanque' + Portuguese:"Tanque-Panzer" // to differ from 'Tanque' } "Bomber":{ diff --git a/tests/src/de/tomgrill/gdxtesting/GdxTestRunner.java b/tests/src/de/tomgrill/gdxtesting/GdxTestRunner.java index 22669c85..bd26ec09 100644 --- a/tests/src/de/tomgrill/gdxtesting/GdxTestRunner.java +++ b/tests/src/de/tomgrill/gdxtesting/GdxTestRunner.java @@ -16,21 +16,21 @@ package de.tomgrill.gdxtesting; -import java.util.HashMap; -import java.util.Map; +import com.badlogic.gdx.ApplicationListener; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.backends.headless.HeadlessApplication; +import com.badlogic.gdx.backends.headless.HeadlessApplicationConfiguration; +import com.badlogic.gdx.graphics.GL20; import org.junit.runner.notification.RunNotifier; import org.junit.runners.BlockJUnit4ClassRunner; import org.junit.runners.model.FrameworkMethod; import org.junit.runners.model.InitializationError; -import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.graphics.GL20; -import static org.mockito.Mockito.mock; +import java.util.HashMap; +import java.util.Map; -import com.badlogic.gdx.ApplicationListener; -import com.badlogic.gdx.backends.headless.HeadlessApplication; -import com.badlogic.gdx.backends.headless.HeadlessApplicationConfiguration; +import static org.mockito.Mockito.mock; public class GdxTestRunner extends BlockJUnit4ClassRunner implements ApplicationListener { diff --git a/tests/src/de/tomgrill/gdxtesting/examples/BasicTests.java b/tests/src/de/tomgrill/gdxtesting/examples/BasicTests.java new file mode 100644 index 00000000..e3132a03 --- /dev/null +++ b/tests/src/de/tomgrill/gdxtesting/examples/BasicTests.java @@ -0,0 +1,40 @@ +// Taken from https://github.com/TomGrill/gdx-testing + +package de.tomgrill.gdxtesting.examples; + +import com.badlogic.gdx.Gdx; +import com.unciv.models.gamebasics.GameBasics; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import de.tomgrill.gdxtesting.GdxTestRunner; + +import static org.junit.Assert.assertTrue; + +// DO NOT attempt to Kotlinize until you're sure that running gradle tests:test actually checks stuff! + +@RunWith(GdxTestRunner.class) +public class BasicTests { + + @Test + public void gamePngExists() { + assertTrue("This test will only pass when the game.png exists", + Gdx.files.local("game.png").exists()); + } + + @Test + public void gameBasicsLoad() { + assertTrue("This test will only pass when the game.png exists", + GameBasics.INSTANCE.getBuildings().size() > 0); + } + +// @Test +// public void setMapEditorScreen() { +// new UncivGame("").create(); // sets the current +// UncivGame.Current.setScreen(new MapEditorScreen(UncivGame.Current.getGameInfo().getTileMap())); +// assertTrue("This test will only pass when we can open the map editor screen", +// GameBasics.INSTANCE.getBuildings().size() > 0); +// } + +} \ No newline at end of file diff --git a/tests/src/de/tomgrill/gdxtesting/examples/BasicTests.kt b/tests/src/de/tomgrill/gdxtesting/examples/BasicTests.kt deleted file mode 100644 index 34edea6b..00000000 --- a/tests/src/de/tomgrill/gdxtesting/examples/BasicTests.kt +++ /dev/null @@ -1,36 +0,0 @@ -// Taken from https://github.com/TomGrill/gdx-testing - -package de.tomgrill.gdxtesting.examples - -import com.badlogic.gdx.Gdx -import com.unciv.UncivGame -import com.unciv.models.gamebasics.GameBasics -import com.unciv.ui.mapeditor.MapEditorScreen -import de.tomgrill.gdxtesting.GdxTestRunner -import org.junit.Assert.assertTrue -import org.junit.Test -import org.junit.runner.RunWith - -@RunWith(GdxTestRunner::class) -class BasicTests { - - @Test - fun gamePngExists() { - assertTrue("This test will only pass when the game.png exists", - Gdx.files.local("game.png").exists()) - } - - @Test - fun gameBasicsLoad() { - assertTrue("This test will only pass when the GameBasics can initialize, and there are buildings", - GameBasics.Buildings.size > 0) - } - - @Test - fun canOpenMapEditorScreen() { - UncivGame.Current.setScreen(MapEditorScreen(UncivGame.Current.gameInfo.tileMap)) - assertTrue("This test will only pass when we can open the map editor screen", - GameBasics.Buildings.size > 0) - } - -} diff --git a/tests/src/de/tomgrill/gdxtesting/examples/UnitTestExample.java b/tests/src/de/tomgrill/gdxtesting/examples/UnitTestExample.java index 6e54436e..e4e0dd4b 100644 --- a/tests/src/de/tomgrill/gdxtesting/examples/UnitTestExample.java +++ b/tests/src/de/tomgrill/gdxtesting/examples/UnitTestExample.java @@ -16,10 +16,10 @@ package de.tomgrill.gdxtesting.examples; -import static org.junit.Assert.assertEquals; - import org.junit.Test; +import static org.junit.Assert.assertEquals; + public class UnitTestExample { @Test @@ -28,3 +28,4 @@ public class UnitTestExample { } } +