Changeset 11693 in josm for trunk/test/unit
- Timestamp:
- 2017-03-05T17:44:07+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java
r11691 r11693 70 70 * @return The parameters. 71 71 */ 72 @Parameters(name ="{1}")72 @Parameters(name = "{1}") 73 73 public static Collection<Object[]> runs() { 74 74 return Stream.of( … … 76 76 new TestConfig("node-shapes", AREA_DEFAULT), 77 77 78 /** Text for nodes */ 79 new TestConfig("node-text", AREA_DEFAULT), 80 78 81 /** Tests that StyledMapRenderer#drawWay respects width */ 79 new TestConfig("way-width", AREA_DEFAULT) 82 new TestConfig("way-width", AREA_DEFAULT), 83 84 /** Tests the way color property, including alpha */ 85 new TestConfig("way-color", AREA_DEFAULT), 86 87 /** Tests dashed ways. */ 88 new TestConfig("way-dashes", AREA_DEFAULT) 80 89 81 90 ).map(e -> new Object[] {e, e.testDirectory}) … … 147 156 nc.zoomTo(testConfig.testArea); 148 157 dataSet.allPrimitives().stream().forEach(n -> n.setHighlighted(n.isKeyTrue("highlight"))); 158 dataSet.allPrimitives().stream().filter(n -> n.isKeyTrue("disabled")).forEach(n -> n.setDisabledState(false)); 149 159 Graphics2D g = image.createGraphics(); 150 160 // Force all render hints to be defaults - do not use platform values … … 207 217 /** 208 218 * Check if two colors differ 209 * @param expected 210 * @param result219 * @param expected The expected color 220 * @param actual The actual color 211 221 * @return <code>true</code> if they differ. 212 222 */ 213 private boolean colorsAreSame(int expected, int result) {223 private boolean colorsAreSame(int expected, int actual) { 214 224 int expectedAlpha = expected >> 24; 215 225 if (expectedAlpha == 0) { 216 return (result & 0xff000000)== 0;226 return actual >> 24 == 0; 217 227 } else { 218 return expected == result;228 return expected == actual; 219 229 } 220 230 }
Note:
See TracChangeset
for help on using the changeset viewer.