Changeset 8838 in josm for trunk/test/unit/org
- Timestamp:
- 2015-10-08T21:38:54+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
r8811 r8838 54 54 Assert.assertFalse(c1.match(newPrimitive("start_date", "1000"))); 55 55 Assert.assertTrue(c1.match(newPrimitive("start_date", "101010"))); 56 56 57 final SearchCompiler.Match c2 = SearchCompiler.compile("start_date<1960"); 57 58 Assert.assertTrue(c2.match(newPrimitive("start_date", "1950-01-01"))); … … 60 61 Assert.assertTrue(c2.match(newPrimitive("start_date", "1000"))); 61 62 Assert.assertTrue(c2.match(newPrimitive("start_date", "200"))); 63 62 64 final SearchCompiler.Match c3 = SearchCompiler.compile("name<I"); 63 65 Assert.assertTrue(c3.match(newPrimitive("name", "Alpha"))); 64 66 Assert.assertFalse(c3.match(newPrimitive("name", "Sigma"))); 67 65 68 final SearchCompiler.Match c4 = SearchCompiler.compile("\"start_date\"<1960"); 66 69 Assert.assertTrue(c4.match(newPrimitive("start_date", "1950-01-01"))); 67 70 Assert.assertFalse(c4.match(newPrimitive("start_date", "2000"))); 68 71 72 final SearchCompiler.Match c5 = SearchCompiler.compile("height>180"); 73 Assert.assertTrue(c5.match(newPrimitive("height", "200"))); 74 Assert.assertTrue(c5.match(newPrimitive("height", "99999"))); 75 Assert.assertFalse(c5.match(newPrimitive("height", "50"))); 76 Assert.assertFalse(c5.match(newPrimitive("height", "-9999"))); 77 Assert.assertFalse(c5.match(newPrimitive("height", "fixme"))); 78 79 final SearchCompiler.Match c6 = SearchCompiler.compile("name>C"); 80 Assert.assertTrue(c6.match(newPrimitive("name", "Delta"))); 81 Assert.assertFalse(c6.match(newPrimitive("name", "Alpha"))); 69 82 } 70 83
Note:
See TracChangeset
for help on using the changeset viewer.