Skip to content

Commit

Permalink
Re-add test for uncovered lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Rabinowitz committed Oct 25, 2023
1 parent 3fe75a7 commit 475d8f6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/apps/testapps/testPolygonToCells.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,18 @@ SUITE(polygonToCells) {
free(hexagons);
}

TEST(polygonToCellsInvalidPolygon) {
// Chosen arbitrarily, polygonToCells should error out before this is an
// issue.
int64_t numHexagons = 0;

H3Index *hexagons = calloc(numHexagons, sizeof(H3Index));
t_assert(H3_EXPORT(polygonToCells)(&invalidGeoPolygon, 9, 0,
hexagons) == E_FAILED,
"Invalid geo polygon cannot be evaluated");
free(hexagons);
}

TEST(fillIndex) {
iterateAllIndexesAtRes(0, fillIndex_assertions);
iterateAllIndexesAtRes(1, fillIndex_assertions);
Expand Down

0 comments on commit 475d8f6

Please sign in to comment.