geojson/geometry - update unit test

This commit is contained in:
artemp 2015-12-14 11:39:42 +00:00
parent 6684019e86
commit 1dff366897
2 changed files with 14 additions and 1 deletions

@ -1 +1 @@
Subproject commit 94fa33e08b81686d85d712afee0b12d4e78f7a0a
Subproject commit 116c65b3f6c12feb7709031ccc92b0f604d44f53

View file

@ -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 );
}
}