From a447c78d2e88d24e5333dbdde92b2d67e682f2cf Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 29 Jan 2016 16:30:03 -0800 Subject: [PATCH] ensure valid objects in shapeindex test --- test/unit/datasource/shapeindex.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unit/datasource/shapeindex.cpp b/test/unit/datasource/shapeindex.cpp index 636713feb..7b3aef029 100644 --- a/test/unit/datasource/shapeindex.cpp +++ b/test/unit/datasource/shapeindex.cpp @@ -39,6 +39,7 @@ std::size_t count_shapefile_features(std::string const& filename) params["type"] = "shape"; params["file"] = filename; auto ds = mapnik::datasource_cache::instance().create(params); + REQUIRE(ds != nullptr); CHECK(ds->type() == mapnik::datasource::datasource_t::Vector); auto fields = ds->get_descriptor().get_descriptors(); mapnik::query query(ds->envelope()); @@ -47,6 +48,7 @@ std::size_t count_shapefile_features(std::string const& filename) query.add_property_name(field.get_name()); } auto features = ds->features(query); + REQUIRE(features != nullptr); std::size_t feature_count = 0; auto feature = features->next();