unit test - add malformed JSON test + update test data
This commit is contained in:
parent
8562d18cd0
commit
b15dba95cd
3 changed files with 12 additions and 3 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 76651203a0918a7f85214d0ed561f15741d5e23f
|
Subproject commit 590d57c648858432d0a2c391a1d7dbb0a99b37a8
|
|
@ -1 +1 @@
|
||||||
Subproject commit 80e318b432b8ead2536df2ec7db96cc650e3eb1c
|
Subproject commit 8544eb8164be721c4e4788e018351a0354d2472a
|
|
@ -117,6 +117,15 @@ TEST_CASE("geojson") {
|
||||||
REQUIRE(feature != nullptr);
|
REQUIRE(feature != nullptr);
|
||||||
REQUIRE(feature->envelope() == mapnik::box2d<double>(123,456,123,456));
|
REQUIRE(feature->envelope() == mapnik::box2d<double>(123,456,123,456));
|
||||||
}
|
}
|
||||||
|
SECTION("json - ensure input fully consumed and throw exception otherwise")
|
||||||
|
{
|
||||||
|
mapnik::parameters params;
|
||||||
|
params["type"] = "geojson";
|
||||||
|
params["file"] = "./test/data/json/points-malformed.geojson"; // mismatched parentheses
|
||||||
|
params["cache-features"] = false;
|
||||||
|
REQUIRE_THROWS(mapnik::datasource_cache::instance().create(params));
|
||||||
|
params["cache-features"] = true;
|
||||||
|
REQUIRE_THROWS(mapnik::datasource_cache::instance().create(params));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue