geojson/geometry - update unit test
This commit is contained in:
parent
6684019e86
commit
1dff366897
2 changed files with 14 additions and 1 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 94fa33e08b81686d85d712afee0b12d4e78f7a0a
|
||||
Subproject commit 116c65b3f6c12feb7709031ccc92b0f604d44f53
|
|
@ -35,4 +35,17 @@ SECTION("json point reversed") {
|
|||
REQUIRE( point.y == 10 );
|
||||
}
|
||||
|
||||
SECTION("json point reversed + extra attributes") {
|
||||
mapnik::util::file input("./test/data/json/point3.json");
|
||||
REQUIRE( input.open() );
|
||||
mapnik::geometry::geometry<double> geom;
|
||||
REQUIRE( input.data() );
|
||||
std::string json_string(input.data().get(), input.size());
|
||||
REQUIRE( mapnik::json::from_geojson(json_string,geom) );
|
||||
REQUIRE( geom.is<mapnik::geometry::point<double> >() );
|
||||
auto const& point = mapnik::util::get<mapnik::geometry::point<double> >(geom);
|
||||
REQUIRE( point.x == 30 );
|
||||
REQUIRE( point.y == 10 );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue