Changeset 9349 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
r9067 r9349 183 183 return new TimestampRange(minDate, maxDate); 184 184 } else { 185 // I18n: Don't translate timestamp keyword 186 throw new ParseError(tr("Expecting <i>min</i>/<i>max</i> after ''timestamp''")); 185 throw new ParseError("<html>" + tr("Expecting {0} after {1}", "<i>min</i>/<i>max</i>", "<i>timestamp</i>")); 187 186 } 188 187 } 189 } 190 } 191 return null; 188 } else { 189 throw new ParseError("<html>" + tr("Expecting {0} after {1}", "<code>:</code>", "<i>" + keyword + "</i>")); 190 } 191 } 192 throw new IllegalStateException("Not expecting keyword " + keyword); 192 193 } 193 194 -
trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
r9214 r9349 2 2 package org.openstreetmap.josm.actions.search; 3 3 4 import static org.junit.Assert.assertEquals; 4 5 import static org.junit.Assert.assertFalse; 5 6 import static org.junit.Assert.assertThat; … … 379 380 anonymous.match(anonymous.n2, true); 380 381 } 382 383 @Test 384 public void testFooTypeBar() throws Exception { 385 try { 386 SearchCompiler.compile("foo type bar"); 387 throw new RuntimeException(); 388 } catch (ParseError parseError) { 389 assertEquals("<html>Expecting <code>:</code> after <i>type<i>", parseError.getMessage()); 390 } 391 } 381 392 }
Note:
See TracChangeset
for help on using the changeset viewer.