GeoJSON unit tests - require expected geometries are "empty".
This commit is contained in:
parent
0e9f8b06a3
commit
c067399041
1 changed files with 6 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
||||||
#include <mapnik/datasource_cache.hpp>
|
#include <mapnik/datasource_cache.hpp>
|
||||||
#include <mapnik/geometry.hpp>
|
#include <mapnik/geometry.hpp>
|
||||||
#include <mapnik/geometry/geometry_type.hpp>
|
#include <mapnik/geometry/geometry_type.hpp>
|
||||||
|
#include <mapnik/geometry/is_empty.hpp>
|
||||||
#include <mapnik/json/geometry_parser.hpp>
|
#include <mapnik/json/geometry_parser.hpp>
|
||||||
#include <mapnik/util/geometry_to_geojson.hpp>
|
#include <mapnik/util/geometry_to_geojson.hpp>
|
||||||
#include <mapnik/util/fs.hpp>
|
#include <mapnik/util/fs.hpp>
|
||||||
|
@ -140,6 +141,11 @@ TEST_CASE("geojson")
|
||||||
std::string json(in);
|
std::string json(in);
|
||||||
mapnik::geometry::geometry<double> geom;
|
mapnik::geometry::geometry<double> geom;
|
||||||
CHECK(mapnik::json::from_geojson(json, geom));
|
CHECK(mapnik::json::from_geojson(json, geom));
|
||||||
|
if (!mapnik::geometry::is_empty(geom))
|
||||||
|
{
|
||||||
|
std::cerr << json << std::endl;
|
||||||
|
}
|
||||||
|
//REQUIRE(mapnik::geometry::is_empty(geom));
|
||||||
// round trip
|
// round trip
|
||||||
std::string json_out;
|
std::string json_out;
|
||||||
CHECK(mapnik::util::to_geojson(json_out, geom));
|
CHECK(mapnik::util::to_geojson(json_out, geom));
|
||||||
|
|
Loading…
Reference in a new issue