Changeset 15925 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r15920 r15925 725 725 726 726 public static Range fromLevel(int a, int b) { 727 if (a > b) 728 throw new AssertionError(); 727 // for input validation in Range constructor below 729 728 double lower = 0; 730 729 double upper = Double.POSITIVE_INFINITY; -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParserTest.java
r15735 r15925 4 4 import static org.junit.Assert.assertEquals; 5 5 import static org.junit.Assert.assertFalse; 6 import static org.junit.Assert.assertNotNull; 6 7 import static org.junit.Assert.assertNull; 7 8 import static org.junit.Assert.assertTrue; … … 626 627 assertTrue(sheet.getErrors().toString(), sheet.getErrors().isEmpty()); 627 628 } 629 630 /** 631 * Test parsing zoom expressions 632 * @throws ParseException if a parsing error occurs 633 */ 634 @Test 635 public void testZoom() throws ParseException { 636 assertNotNull(getParser("|z12").zoom()); 637 assertNotNull(getParser("|z12-").zoom()); 638 assertNotNull(getParser("|z-12").zoom()); 639 assertNotNull(getParser("|z12-16").zoom()); 640 } 641 642 /** 643 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/18759">Bug #18759</a>. 644 * @throws ParseException if a parsing error occurs 645 */ 646 @Test(expected = IllegalArgumentException.class) 647 public void testZoomIAE() throws ParseException { 648 assertNotNull(getParser("|z16-15").zoom()); 649 } 628 650 }
Note: See TracChangeset
for help on using the changeset viewer.