Changeset 17990 in josm


Ignore:
Timestamp:
2021-07-11T00:49:02+02:00 (4 years ago)
Author:
Don-vip
Message:

see #17177 - detailed errors for random unit test failures

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/vectortile/mapbox/style/MapboxVectorStyle.java

    r17968 r17990  
    282282        return Objects.hash(this.name, this.version, this.glyphUrl, this.spriteUrl, this.sources);
    283283    }
     284
     285    @Override
     286    public String toString() {
     287        return "MapboxVectorStyle [version=" + version + ", " + (name != null ? "name=" + name + ", " : "")
     288                + (spriteUrl != null ? "spriteUrl=" + spriteUrl + ", " : "")
     289                + (glyphUrl != null ? "glyphUrl=" + glyphUrl + ", " : "")
     290                + (sources != null ? "sources=" + sources : "") + "]";
     291    }
    284292}
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/vectortile/mapbox/style/MapboxVectorStyleTest.java

    r17965 r17990  
    238238        final String file = "file:/" + TestUtils.getTestDataRoot() + "/mapillary.json";
    239239        final MapboxVectorStyle style = MapboxVectorStyle.getMapboxVectorStyle(file);
    240         assertNotNull(style);
     240        assertNotNull(style, file);
    241241        // There are three "sources" in the mapillary.json file
    242242        assertEquals(3, style.getSources().size());
     
    244244          .filter(source -> "mapillary-source".equals(source.getKey().getName())).map(
    245245            Map.Entry::getValue).findAny().orElse(null);
    246         assertNotNull(mapillarySource);
     246        assertNotNull(mapillarySource, style.toString());
    247247        mapillarySource.getStyleSources().forEach(StyleSource::loadStyleSource);
    248248        assertEquals(1, mapillarySource.getStyleSources().size());
    249249        final MapCSSStyleSource mapillaryCssSource = (MapCSSStyleSource) mapillarySource.getStyleSources().get(0);
    250         assertTrue(mapillaryCssSource.getErrors().isEmpty());
     250        assertTrue(mapillaryCssSource.getErrors().isEmpty(), mapillaryCssSource.getErrors().toString());
    251251        final MapCSSRule mapillaryOverview = getRule(mapillaryCssSource, "node", "mapillary-overview");
    252         assertNotNull(mapillaryOverview);
     252        assertNotNull(mapillaryOverview, mapillaryCssSource.toString());
    253253        assertInInstructions(mapillaryOverview.declaration.instructions, "symbol-shape", new Keyword("circle"));
    254254        assertInInstructions(mapillaryOverview.declaration.instructions, "symbol-fill-color", ColorHelper.html2color("#05CB63"));
Note: See TracChangeset for help on using the changeset viewer.