Skip to content

Commit

Permalink
Fix GeometryCollection test in Construct GeometryCollection and GeoJS…
Browse files Browse the repository at this point in the history
…ON representation
  • Loading branch information
Waguramu committed Dec 18, 2024
1 parent 8a0a06f commit a26420f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/test-model-geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ TEST_CASE("GeometryCollection", "[geom.collection]")
SECTION("Construct GeometryCollection")
{
REQUIRE(asModelNode(geometry_collection).type() == ValueType::Object);
REQUIRE(asModelNode(geometry_collection).size() == 2); // 'type' and 'geometries' fields
REQUIRE(asModelNode(geometry_collection).size() == 3); // 'type' and 'geometries' fields
}

SECTION("Recover geometry")
Expand All @@ -178,7 +178,7 @@ TEST_CASE("GeometryCollection", "[geom.collection]")
// Since the collection only contains one geometry,
// it hides itself and directly presents the nested geometry,
// conforming to GeoJSON (a collection must have >1 geometries).
REQUIRE(asModelNode(geometry_collection).size() == 2); // 'type' and 'geometry' fields
REQUIRE(asModelNode(geometry_collection).size() == 3); // 'type' and 'geometry' fields
REQUIRE(asModelNode(geometry_collection).at(1)->type() == ValueType::Array); // 'geometry' field
REQUIRE(asModelNode(geometry_collection).at(1)->size() == 4); // four points

Expand Down

0 comments on commit a26420f

Please sign in to comment.