diff options
author | Pacien TRAN-GIRARD | 2015-11-22 16:02:00 +0100 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2015-11-22 16:02:00 +0100 |
commit | 751d8761de19ad6e768d5742c6c746b22f514868 (patch) | |
tree | 4dd2027579dabae47d6f0b677843af3a968e6873 /src/ch/epfl/maze | |
parent | 10627af7a85b50bce965245a472d9b69e928d0ba (diff) | |
download | maze-solver-751d8761de19ad6e768d5742c6c746b22f514868.tar.gz |
Disable debug (step-by-step) mode for tests
Diffstat (limited to 'src/ch/epfl/maze')
-rw-r--r-- | src/ch/epfl/maze/tests/GhostsTest.java | 10 | ||||
-rw-r--r-- | src/ch/epfl/maze/tests/ZooTest.java | 16 |
2 files changed, 15 insertions, 11 deletions
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; | |||
22 | 22 | ||
23 | public class GhostsTest extends TestCase { | 23 | public class GhostsTest extends TestCase { |
24 | 24 | ||
25 | public static final boolean DEBUG = false; | ||
26 | |||
25 | /** | 27 | /** |
26 | * Tests the behavior of Blinky. | 28 | * Tests the behavior of Blinky. |
27 | * <p> | 29 | * <p> |
@@ -39,7 +41,7 @@ public class GhostsTest extends TestCase { | |||
39 | d.addPrey(new PacMan(new Vector2D(1, 5), false)); | 41 | d.addPrey(new PacMan(new Vector2D(1, 5), false)); |
40 | 42 | ||
41 | Display display = new Display(simulation); | 43 | Display display = new Display(simulation); |
42 | display.setDebug(true); | 44 | display.setDebug(GhostsTest.DEBUG); |
43 | display.run(); | 45 | display.run(); |
44 | } | 46 | } |
45 | 47 | ||
@@ -60,7 +62,7 @@ public class GhostsTest extends TestCase { | |||
60 | d.addPrey(new PacMan(new Vector2D(6, 3), true)); | 62 | d.addPrey(new PacMan(new Vector2D(6, 3), true)); |
61 | 63 | ||
62 | Display display = new Display(simulation); | 64 | Display display = new Display(simulation); |
63 | display.setDebug(true); | 65 | display.setDebug(GhostsTest.DEBUG); |
64 | display.run(); | 66 | display.run(); |
65 | } | 67 | } |
66 | 68 | ||
@@ -82,7 +84,7 @@ public class GhostsTest extends TestCase { | |||
82 | d.addPrey(new PacMan(new Vector2D(5, 5), false)); | 84 | d.addPrey(new PacMan(new Vector2D(5, 5), false)); |
83 | 85 | ||
84 | Display display = new Display(simulation); | 86 | Display display = new Display(simulation); |
85 | display.setDebug(true); | 87 | display.setDebug(GhostsTest.DEBUG); |
86 | display.run(); | 88 | display.run(); |
87 | } | 89 | } |
88 | 90 | ||
@@ -103,7 +105,7 @@ public class GhostsTest extends TestCase { | |||
103 | d.addPrey(new PacMan(new Vector2D(8, 3), false)); | 105 | d.addPrey(new PacMan(new Vector2D(8, 3), false)); |
104 | 106 | ||
105 | Display display = new Display(simulation); | 107 | Display display = new Display(simulation); |
106 | display.setDebug(true); | 108 | display.setDebug(GhostsTest.DEBUG); |
107 | display.run(); | 109 | display.run(); |
108 | } | 110 | } |
109 | 111 | ||
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; | |||
15 | 15 | ||
16 | public class ZooTest extends TestCase { | 16 | public class ZooTest extends TestCase { |
17 | 17 | ||
18 | public static final boolean DEBUG = false; | ||
19 | |||
18 | /** | 20 | /** |
19 | * Tests the behaviour of the Mouse A.I. | 21 | * Tests the behaviour of the Mouse A.I. |
20 | * <p> | 22 | * <p> |
@@ -31,7 +33,7 @@ public class ZooTest extends TestCase { | |||
31 | m.addAnimal(new Mouse(m.getStart())); | 33 | m.addAnimal(new Mouse(m.getStart())); |
32 | 34 | ||
33 | Display display = new Display(simulation); | 35 | Display display = new Display(simulation); |
34 | display.setDebug(true); | 36 | display.setDebug(ZooTest.DEBUG); |
35 | display.run(); | 37 | display.run(); |
36 | } | 38 | } |
37 | 39 | ||
@@ -51,7 +53,7 @@ public class ZooTest extends TestCase { | |||
51 | m.addAnimal(new Hamster(m.getStart())); | 53 | m.addAnimal(new Hamster(m.getStart())); |
52 | 54 | ||
53 | Display display = new Display(simulation); | 55 | Display display = new Display(simulation); |
54 | display.setDebug(true); | 56 | display.setDebug(ZooTest.DEBUG); |
55 | display.run(); | 57 | display.run(); |
56 | } | 58 | } |
57 | 59 | ||
@@ -71,7 +73,7 @@ public class ZooTest extends TestCase { | |||
71 | m.addAnimal(new Monkey(m.getStart())); | 73 | m.addAnimal(new Monkey(m.getStart())); |
72 | 74 | ||
73 | Display display = new Display(simulation); | 75 | Display display = new Display(simulation); |
74 | display.setDebug(true); | 76 | display.setDebug(ZooTest.DEBUG); |
75 | display.run(); | 77 | display.run(); |
76 | } | 78 | } |
77 | 79 | ||
@@ -93,7 +95,7 @@ public class ZooTest extends TestCase { | |||
93 | m.addAnimal(new Bear(m.getStart())); | 95 | m.addAnimal(new Bear(m.getStart())); |
94 | 96 | ||
95 | Display display = new Display(simulation); | 97 | Display display = new Display(simulation); |
96 | display.setDebug(true); | 98 | display.setDebug(ZooTest.DEBUG); |
97 | display.run(); | 99 | display.run(); |
98 | } | 100 | } |
99 | 101 | ||
@@ -114,7 +116,7 @@ public class ZooTest extends TestCase { | |||
114 | m.addAnimal(new Bear(m.getStart())); | 116 | m.addAnimal(new Bear(m.getStart())); |
115 | 117 | ||
116 | Display display = new Display(simulation); | 118 | Display display = new Display(simulation); |
117 | display.setDebug(true); | 119 | display.setDebug(ZooTest.DEBUG); |
118 | display.run(); | 120 | display.run(); |
119 | } | 121 | } |
120 | 122 | ||
@@ -135,7 +137,7 @@ public class ZooTest extends TestCase { | |||
135 | m.addAnimal(new Panda(m.getStart())); | 137 | m.addAnimal(new Panda(m.getStart())); |
136 | 138 | ||
137 | Display display = new Display(simulation); | 139 | Display display = new Display(simulation); |
138 | display.setDebug(true); | 140 | display.setDebug(ZooTest.DEBUG); |
139 | display.run(); | 141 | display.run(); |
140 | } | 142 | } |
141 | 143 | ||
@@ -156,7 +158,7 @@ public class ZooTest extends TestCase { | |||
156 | m.addAnimal(new Panda(m.getStart())); | 158 | m.addAnimal(new Panda(m.getStart())); |
157 | 159 | ||
158 | Display display = new Display(simulation); | 160 | Display display = new Display(simulation); |
159 | display.setDebug(true); | 161 | display.setDebug(ZooTest.DEBUG); |
160 | display.run(); | 162 | display.run(); |
161 | } | 163 | } |
162 | 164 | ||