ext/h3/src/src/apps/testapps/testCompact.c in h3-3.5.1 vs ext/h3/src/src/apps/testapps/testCompact.c in h3-3.6.0

- old
+ new

@@ -163,10 +163,14 @@ t_assert(sizeResult < 0, "maxUncompactSize fails when given illogical resolutions"); sizeResult = H3_EXPORT(maxUncompactSize)(someHexagons, numHex, -1); t_assert(sizeResult < 0, "maxUncompactSize fails when given illegal resolutions"); + sizeResult = + H3_EXPORT(maxUncompactSize)(someHexagons, numHex, MAX_H3_RES + 1); + t_assert(sizeResult < 0, + "maxUncompactSize fails when given resolutions beyond max"); H3Index uncompressed[] = {0, 0, 0}; int uncompactResult = H3_EXPORT(uncompact)(someHexagons, numHex, uncompressed, numHex, 0); t_assert(uncompactResult != 0, @@ -178,9 +182,17 @@ uncompactResult = H3_EXPORT(uncompact)(someHexagons, numHex, uncompressed, numHex - 1, 5); t_assert( uncompactResult != 0, "uncompact fails when given too little buffer (same resolution)"); + + for (int i = 0; i < numHex; i++) { + setH3Index(&someHexagons[i], MAX_H3_RES, i, 0); + } + uncompactResult = H3_EXPORT(uncompact)( + someHexagons, numHex, uncompressed, numHex * 7, MAX_H3_RES + 1); + t_assert(uncompactResult != 0, + "uncompact fails when given resolutions beyond max"); } TEST(someHexagon) { H3Index origin; setH3Index(&origin, 1, 5, 0);