- Timestamp:
- 2017-03-07T23:45:28+01:00 (8 years ago)
- Location:
- trunk/test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/data/renderer/node-text/style.mapcss
r11693 r11697 9 9 symbol-fill-color: #8888ff; 10 10 text-color: red; 11 font-family: DejaVu Sans; 11 12 _match: regexp_match("n(.+)", tag("test")); 12 13 text: eval(concat("Test ", get(prop("_match"),1))); -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java
r11693 r11697 6 6 7 7 import java.awt.Graphics2D; 8 import java.awt.GraphicsEnvironment; 8 9 import java.awt.Point; 9 10 import java.awt.RenderingHints; … … 17 18 import java.util.Arrays; 18 19 import java.util.Collection; 20 import java.util.List; 19 21 import java.util.stream.Collectors; 20 22 import java.util.stream.Stream; … … 77 79 78 80 /** Text for nodes */ 79 new TestConfig("node-text", AREA_DEFAULT) ,81 new TestConfig("node-text", AREA_DEFAULT).usesFont("DejaVu Sans"), 80 82 81 83 /** Tests that StyledMapRenderer#drawWay respects width */ … … 108 110 public void testForOpenJDK() { 109 111 String javaHome = System.getProperty("java.home"); 110 Assume.assumeTrue(javaHome != null && javaHome.contains("openjdk")); 112 Assume.assumeTrue("Test requires openJDK", javaHome != null && javaHome.contains("openjdk")); 113 114 List<String> fonts = Arrays.asList(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames()); 115 for(String font : testConfig.fonts) { 116 Assume.assumeTrue("Test requires font: " + font, fonts.contains(font)); 117 } 111 118 } 112 119 … … 233 240 private final String testDirectory; 234 241 private final Bounds testArea; 242 private final ArrayList<String> fonts = new ArrayList<>(); 235 243 236 244 TestConfig(String testDirectory, Bounds testArea) { 237 245 this.testDirectory = testDirectory; 238 246 this.testArea = testArea; 247 } 248 249 public TestConfig usesFont(String string) { 250 this.fonts.add(string); 251 return this; 239 252 } 240 253
Note:
See TracChangeset
for help on using the changeset viewer.