Changeset 13325 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2018-01-14T19:09:13+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java
r13317 r13325 6 6 import static org.junit.Assert.assertNotNull; 7 7 import static org.junit.Assert.assertTrue; 8 import static org.junit.Assert.fail;9 8 10 9 import java.lang.reflect.Field; … … 409 408 /** 410 409 * Compiles "foo type bar" and tests the parse error message 411 */ 412 @Test 413 public void testFooTypeBar() { 414 try { 415 SearchCompiler.compile("foo type bar"); 416 fail(); 417 } catch (SearchParseError parseError) { 418 assertEquals("<html>Expecting <code>:</code> after <i>type</i>", parseError.getMessage()); 419 } 410 * @throws SearchParseError always 411 */ 412 @Test 413 public void testFooTypeBar() throws SearchParseError { 414 expectedEx.expect(SearchParseError.class); 415 expectedEx.expectMessage("<html>Expecting <code>:</code> after <i>type</i></html>"); 416 SearchCompiler.compile("foo type bar"); 420 417 } 421 418 … … 693 690 } 694 691 } 695 696 /**697 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/15755">Bug #15755</a>.698 * @throws SearchParseError always699 */700 @Test701 public void testTicket15755() throws SearchParseError {702 expectedEx.expect(SearchParseError.class);703 expectedEx.expectMessage("<html>Expecting <code>:</code> after <i>type</i></html>");704 SearchCompiler.compile("public_transport=stop_area -type");705 }706 692 }
Note:
See TracChangeset
for help on using the changeset viewer.