From e97759d01b32a55423db9b5df09b1888e7a31714 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Mon, 11 Sep 2017 17:54:54 +0100 Subject: [PATCH] geojson test - require throwing on an empty feature collection (not sure this is correct but needed to preserve 3.0.x behaviour) --- test/unit/datasource/geojson.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/test/unit/datasource/geojson.cpp b/test/unit/datasource/geojson.cpp index 60af00de8..2ed99d9e2 100644 --- a/test/unit/datasource/geojson.cpp +++ b/test/unit/datasource/geojson.cpp @@ -108,14 +108,7 @@ TEST_CASE("geojson") { params["type"] = "geojson"; params["file"] = "./test/data/json/empty_featurecollection.json"; params["cache_features"] = cache_features; - auto ds = mapnik::datasource_cache::instance().create(params); - CHECK(ds != nullptr); - auto fs = all_features(ds); - REQUIRE(!mapnik::is_valid(fs)); - while (auto f = fs->next()) - { - CHECK(false); // shouldn't get here - } + REQUIRE_THROWS(mapnik::datasource_cache::instance().create(params)); } }