Skip to content

Commit

Permalink
add a test for maplibre#186
Browse files Browse the repository at this point in the history
  • Loading branch information
springmeyer committed Jun 21, 2024
1 parent 82afe27 commit d53271a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
20 changes: 10 additions & 10 deletions java/src/test/java/com/mlt/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ private static int compareFeatures(
}
var mltProperty = mltProperties.get(mvtPropertyKey);
if (mltProperty == null) {
System.out.println(mvtFeature.id() + " mlt prop missing for " + mvtProperty.getKey());
System.out.println(" mvtProperties: " + mvtProperties);
System.out.println(" mltProperties: " + mltProperties);
// System.out.println(mvtFeature.id() + " mlt prop missing for " + mvtProperty.getKey());
// System.out.println(" mvtProperties: " + mvtProperties);
// System.out.println(" mltProperties: " + mltProperties);
numErrors++;
} else if (!mltProperty.equals(mvtProperty.getValue())) {
System.out.println(
"Failure comparing property "
+ mvtProperty.getKey()
+ " for feature: "
+ mvtFeature.id());
System.out.println(" mvtProperty: " + mvtProperty.getValue());
System.out.println(" mltProperty: " + mltProperty);
// System.out.println(
// "Failure comparing property "
// + mvtProperty.getKey()
// + " for feature: "
// + mvtFeature.id());
// System.out.println(" mvtProperty: " + mvtProperty.getValue());
// System.out.println(" mltProperty: " + mltProperty);
numErrors++;
} else {
assertEquals(mvtProperty.getValue(), mltProperty);
Expand Down
13 changes: 13 additions & 0 deletions java/src/test/java/com/mlt/decoder/MltDecoderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ public class MltDecoderTest {

/* Bing Maps tests --------------------------------------------------------- */

// TODO: after https://github.com/maplibre/maplibre-tile-spec/issues/186 is fixed
// remove this test and start testing all the Bing tiles with sorting enabled
@Test
public void decodeBingTilesSortedFail() throws IOException {
var tileId = "4-8-5";
var result =
testTile(tileId, TestSettings.BING_MVT_PATH, DecoderType.BOTH, EncodingType.ADVANCED, true);
assertEquals(
1148,
result.numErrorsAdvanced,
"Error for " + tileId + "/advanced: " + result.numErrorsAdvanced);
}

private static Stream<String> bingProvider() {
return Stream.of(
"4-8-5", "4-9-5", "4-12-6", "4-13-6", "5-16-11", "5-17-11", "5-17-10", "6-32-22", "6-33-22",
Expand Down

0 comments on commit d53271a

Please # to comment.