Changeset 9701 in josm for trunk/test
- Timestamp:
- 2016-01-31T16:17:34+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
r9373 r9701 24 24 import org.openstreetmap.josm.data.osm.Way; 25 25 import org.openstreetmap.josm.data.osm.WayData; 26 import org.openstreetmap.josm.tools.date.DateUtils; 26 27 27 28 /** … … 381 382 } 382 383 383 @Test 384 public void testFooTypeBar() throws Exception { 384 /** 385 * Compiles "foo type bar" and tests the parse error message 386 */ 387 @Test 388 public void testFooTypeBar() { 385 389 try { 386 390 SearchCompiler.compile("foo type bar"); … … 390 394 } 391 395 } 396 397 /** 398 * Search for primitive timestamps. 399 * @throws ParseError if an error has been encountered while compiling 400 */ 401 @Test 402 public void testTimestamp() throws ParseError { 403 final Match search = SearchCompiler.compile("timestamp:2010/2011"); 404 final Node n1 = new Node(); 405 n1.setTimestamp(DateUtils.fromString("2010-01-22")); 406 assertTrue(search.match(n1)); 407 n1.setTimestamp(DateUtils.fromString("2016-01-22")); 408 assertFalse(search.match(n1)); 409 } 392 410 }
Note:
See TracChangeset
for help on using the changeset viewer.