187 ); |
187 ); |
188 } |
188 } |
189 |
189 |
190 public void testRerun() { |
190 public void testRerun() { |
191 test(false, new String[] {"--no-startup"}, |
191 test(false, new String[] {"--no-startup"}, |
192 (a) -> assertCommand(a, "/0", "| No snippet with id: 0"), |
192 (a) -> assertCommand(a, "/0", "| No snippet with ID: 0"), |
193 (a) -> assertCommand(a, "/5", "| No snippet with id: 5") |
193 (a) -> assertCommand(a, "/5", "| No snippet with ID: 5") |
194 ); |
194 ); |
195 String[] codes = new String[] { |
195 String[] codes = new String[] { |
196 "int a = 0;", // var |
196 "int a = 0;", // var |
197 "class A {}", // class |
197 "class A {}", // class |
198 "void f() {}", // method |
198 "void f() {}", // method |
249 assertRerun.apply("/e1").apply("add(ONE)", 3), assertVariables, |
249 assertRerun.apply("/e1").apply("add(ONE)", 3), assertVariables, |
250 assertRerun.apply("/s1").apply("int assertionCount = 0;", 0), assertVariables |
250 assertRerun.apply("/s1").apply("int assertionCount = 0;", 0), assertVariables |
251 ); |
251 ); |
252 |
252 |
253 test(false, new String[] {"--no-startup"}, |
253 test(false, new String[] {"--no-startup"}, |
254 (a) -> assertCommand(a, "/s1", "| No snippet with id: s1"), |
254 (a) -> assertCommand(a, "/s1", "| No snippet with ID: s1"), |
255 (a) -> assertCommand(a, "/1", "| No snippet with id: 1"), |
255 (a) -> assertCommand(a, "/1", "| No snippet with ID: 1"), |
256 (a) -> assertCommand(a, "/e1", "| No snippet with id: e1") |
256 (a) -> assertCommand(a, "/e1", "| No snippet with ID: e1") |
257 ); |
257 ); |
258 } |
258 } |
259 |
259 |
260 public void testClasspathDirectory() { |
260 public void testClasspathDirectory() { |
261 Compiler compiler = new Compiler(); |
261 Compiler compiler = new Compiler(); |