We now fail a build if the debug parameters were commited to the repo

This commit is contained in:
Yair Morgenstern 2019-12-12 23:56:39 +02:00
parent 58d58ef3a3
commit d704b78034
2 changed files with 10 additions and 1 deletions

View file

@ -24,7 +24,8 @@ cache:
- $HOME/.android/build-cache
script:
- ./gradlew test
- ./gradlew check
- ./gradlew tests: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;

View file

@ -3,6 +3,7 @@
package de.tomgrill.gdxtesting.examples;
import com.badlogic.gdx.Gdx;
import com.unciv.UncivGame;
import com.unciv.models.gamebasics.Ruleset;
import org.junit.Test;
@ -29,6 +30,13 @@ public class BasicTests {
new Ruleset(true).getBuildings().size() > 0);
}
@Test
public void gameIsNotRunWithDebugModes() {
assertTrue("This test will only pass if the game is not run with debug modes",
!new UncivGame("").getSuperchargedForDebug()
&& !new UncivGame("").getViewEntireMapForDebug());
}
// @Test
// public void setMapEditorScreen() {