diff --git a/src/apps/testapps/testCompactCells.c b/src/apps/testapps/testCompactCells.c index 2a56c7ae5..c07507be7 100644 --- a/src/apps/testapps/testCompactCells.c +++ b/src/apps/testapps/testCompactCells.c @@ -15,6 +15,7 @@ */ #include +#include #include "constants.h" #include "h3Index.h" @@ -112,6 +113,18 @@ SUITE(compactCells) { int64_t numUncompacted = numRes1; t_assertSuccess(H3_EXPORT(compactCells)(cells1, out, numUncompacted)); + memset(out, 0, sizeof(H3Index) * numRes1); + + numUncompacted = 44; + t_assertSuccess( + H3_EXPORT(compactCells)(&cells1[80], out, numUncompacted)); + + memset(out, 0, sizeof(H3Index) * numRes1); + + numUncompacted = 43; + t_assertSuccess( + H3_EXPORT(compactCells)(&cells1[80], out, numUncompacted)); + // TODO: check that output matches cells0 free(cells0);