From 751d8761de19ad6e768d5742c6c746b22f514868 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sun, 22 Nov 2015 16:02:00 +0100 Subject: Disable debug (step-by-step) mode for tests --- src/ch/epfl/maze/tests/GhostsTest.java | 10 ++++++---- src/ch/epfl/maze/tests/ZooTest.java | 16 +++++++++------- 2 files changed, 15 insertions(+), 11 deletions(-) (limited to 'src/ch/epfl/maze') diff --git a/src/ch/epfl/maze/tests/GhostsTest.java b/src/ch/epfl/maze/tests/GhostsTest.java index 782a8f3..c8c71a9 100644 --- a/src/ch/epfl/maze/tests/GhostsTest.java +++ b/src/ch/epfl/maze/tests/GhostsTest.java @@ -22,6 +22,8 @@ import org.junit.Test; public class GhostsTest extends TestCase { + public static final boolean DEBUG = false; + /** * Tests the behavior of Blinky. *

@@ -39,7 +41,7 @@ public class GhostsTest extends TestCase { d.addPrey(new PacMan(new Vector2D(1, 5), false)); Display display = new Display(simulation); - display.setDebug(true); + display.setDebug(GhostsTest.DEBUG); display.run(); } @@ -60,7 +62,7 @@ public class GhostsTest extends TestCase { d.addPrey(new PacMan(new Vector2D(6, 3), true)); Display display = new Display(simulation); - display.setDebug(true); + display.setDebug(GhostsTest.DEBUG); display.run(); } @@ -82,7 +84,7 @@ public class GhostsTest extends TestCase { d.addPrey(new PacMan(new Vector2D(5, 5), false)); Display display = new Display(simulation); - display.setDebug(true); + display.setDebug(GhostsTest.DEBUG); display.run(); } @@ -103,7 +105,7 @@ public class GhostsTest extends TestCase { d.addPrey(new PacMan(new Vector2D(8, 3), false)); Display display = new Display(simulation); - display.setDebug(true); + display.setDebug(GhostsTest.DEBUG); display.run(); } diff --git a/src/ch/epfl/maze/tests/ZooTest.java b/src/ch/epfl/maze/tests/ZooTest.java index 7170ab9..04b6a79 100644 --- a/src/ch/epfl/maze/tests/ZooTest.java +++ b/src/ch/epfl/maze/tests/ZooTest.java @@ -15,6 +15,8 @@ import org.junit.Test; public class ZooTest extends TestCase { + public static final boolean DEBUG = false; + /** * Tests the behaviour of the Mouse A.I. *

@@ -31,7 +33,7 @@ public class ZooTest extends TestCase { m.addAnimal(new Mouse(m.getStart())); Display display = new Display(simulation); - display.setDebug(true); + display.setDebug(ZooTest.DEBUG); display.run(); } @@ -51,7 +53,7 @@ public class ZooTest extends TestCase { m.addAnimal(new Hamster(m.getStart())); Display display = new Display(simulation); - display.setDebug(true); + display.setDebug(ZooTest.DEBUG); display.run(); } @@ -71,7 +73,7 @@ public class ZooTest extends TestCase { m.addAnimal(new Monkey(m.getStart())); Display display = new Display(simulation); - display.setDebug(true); + display.setDebug(ZooTest.DEBUG); display.run(); } @@ -93,7 +95,7 @@ public class ZooTest extends TestCase { m.addAnimal(new Bear(m.getStart())); Display display = new Display(simulation); - display.setDebug(true); + display.setDebug(ZooTest.DEBUG); display.run(); } @@ -114,7 +116,7 @@ public class ZooTest extends TestCase { m.addAnimal(new Bear(m.getStart())); Display display = new Display(simulation); - display.setDebug(true); + display.setDebug(ZooTest.DEBUG); display.run(); } @@ -135,7 +137,7 @@ public class ZooTest extends TestCase { m.addAnimal(new Panda(m.getStart())); Display display = new Display(simulation); - display.setDebug(true); + display.setDebug(ZooTest.DEBUG); display.run(); } @@ -156,7 +158,7 @@ public class ZooTest extends TestCase { m.addAnimal(new Panda(m.getStart())); Display display = new Display(simulation); - display.setDebug(true); + display.setDebug(ZooTest.DEBUG); display.run(); } -- cgit v1.2.3