diff --git a/test/data/renderer/eval/style.mapcss b/test/data/renderer/eval/style.mapcss
index 287830287..4abbc72a0 100644
|
a
|
b
|
|
| 1 | 1 | * { |
| | 2 | font-family: "DejaVu Sans"; |
| 2 | 3 | font-size: 20; |
| 3 | 4 | } |
| 4 | 5 | |
| … |
… |
node[test=2] {
|
| 22 | 23 | |
| 23 | 24 | node[test=3] { |
| 24 | 25 | lst: 12, 3, 6; |
| 25 | | tmp: list(get(prop("lst"), 1), get(prop("lst"), 0), get(prop("lst"), 2), length(prop("lst"))); |
| | 26 | tmp: list(get(prop("lst"), 1), get(prop("lst"), 0), get(prop("lst"), 2), count(prop("lst"))); |
| 26 | 27 | value: concat("", prop("tmp")); |
| 27 | 28 | result: "[3.0, 12.0, 6.0, 3]"; |
| 28 | 29 | } |
| … |
… |
node[test=4] {
|
| 35 | 36 | node[test] { |
| 36 | 37 | text: concat("Test ", tag("test"), ": ", prop(result), " == ", prop(value)); |
| 37 | 38 | } |
| 38 | | |
diff --git a/test/data/renderer/node-text2/style.mapcss b/test/data/renderer/node-text2/style.mapcss
index cb17205c8..d474955a7 100644
|
a
|
b
|
|
| 3 | 3 | * Text placement test |
| 4 | 4 | */ |
| 5 | 5 | node[test=text-placement]::* { |
| | 6 | font-family: "DejaVu Sans"; |
| 6 | 7 | font-size: 10; |
| 7 | 8 | text: auto; |
| 8 | 9 | symbol-shape: square; |
diff --git a/test/functional/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java b/test/functional/org/openstreetmap/josm/gui/mappaint/MapCSSRendererTest.java
index 58177f778..2952a98ab 100644
|
a
|
b
|
public class MapCSSRendererTest {
|
| 101 | 101 | .setThresholdPixels(0).setThresholdTotalColorDiff(0), |
| 102 | 102 | |
| 103 | 103 | /** Tests area label drawing/placement */ |
| 104 | | new TestConfig("area-text", AREA_DEFAULT) |
| | 104 | new TestConfig("area-text", AREA_DEFAULT).usesFont("DejaVu Sans") |
| 105 | 105 | .setThresholdPixels(0).setThresholdTotalColorDiff(0), |
| 106 | 106 | |
| 107 | 107 | /** Tests area icon drawing/placement */ |
| … |
… |
public class MapCSSRendererTest {
|
| 120 | 120 | .setThresholdPixels(0).setThresholdTotalColorDiff(0), |
| 121 | 121 | |
| 122 | 122 | /** Tests text along a way */ |
| 123 | | new TestConfig("way-text", AREA_DEFAULT) |
| | 123 | new TestConfig("way-text", AREA_DEFAULT).usesFont("DejaVu Sans") |
| 124 | 124 | .setThresholdPixels(3400).setThresholdTotalColorDiff(0), |
| 125 | 125 | |
| 126 | 126 | /** Another test for node shapes */ |
| … |
… |
public class MapCSSRendererTest {
|
| 136 | 136 | new TestConfig("way-dashes2") |
| 137 | 137 | .setThresholdPixels(0).setThresholdTotalColorDiff(0), |
| 138 | 138 | /** Tests node text placement */ |
| 139 | | new TestConfig("node-text2") |
| | 139 | new TestConfig("node-text2").usesFont("DejaVu Sans") |
| 140 | 140 | .setThresholdPixels(1020).setThresholdTotalColorDiff(0), |
| 141 | 141 | /** Tests relation link selector */ |
| 142 | 142 | new TestConfig("relation-linkselector") |
| … |
… |
public class MapCSSRendererTest {
|
| 146 | 146 | .setThresholdPixels(0).setThresholdTotalColorDiff(0), |
| 147 | 147 | |
| 148 | 148 | /** Tests evaluation of expressions */ |
| 149 | | new TestConfig("eval").setImageWidth(600) |
| | 149 | new TestConfig("eval").setImageWidth(600).usesFont("DejaVu Sans") |
| 150 | 150 | .setThresholdPixels(6610).setThresholdTotalColorDiff(0) |
| 151 | 151 | |
| 152 | 152 | ).map(e -> new Object[] {e, e.testDirectory}) |
| … |
… |
public class MapCSSRendererTest {
|
| 227 | 227 | return; |
| 228 | 228 | } |
| 229 | 229 | final BufferedImage reference = ImageIO.read(referenceImageFile); |
| 230 | | assertEquals(image.getWidth(), reference.getWidth()); |
| 231 | | assertEquals(image.getHeight(), reference.getHeight()); |
| | 230 | assertEquals(reference.getWidth(), image.getWidth()); |
| | 231 | assertEquals(reference.getHeight(), image.getHeight()); |
| 232 | 232 | |
| 233 | 233 | StringBuilder differences = new StringBuilder(); |
| 234 | 234 | ArrayList<Point> differencePoints = new ArrayList<>(); |