From 626cb9f47c38f561e53618677fda2420643a8ffb Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 22 Jul 2015 15:28:55 +0200 Subject: [PATCH] add display=none test --- test/data | 2 +- test/unit/svg/svg_parser_test.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/test/data b/test/data index 86c5f815a..867d26dbf 160000 --- a/test/data +++ b/test/data @@ -1 +1 @@ -Subproject commit 86c5f815a772ccdd30fba98d8caed1954435c2ac +Subproject commit 867d26dbfc536e58abcb25d4db5726a921cccf79 diff --git a/test/unit/svg/svg_parser_test.cpp b/test/unit/svg/svg_parser_test.cpp index bc8f65665..d87cf40ef 100644 --- a/test/unit/svg/svg_parser_test.cpp +++ b/test/unit/svg/svg_parser_test.cpp @@ -94,6 +94,24 @@ TEST_CASE("SVG parser") { } } + SECTION("SVG parser display=none") + { + + std::string svg_name("./test/data/svg/invisible.svg"); + std::shared_ptr marker = mapnik::marker_cache::instance().find(svg_name, false); + REQUIRE(marker); + REQUIRE(marker->is()); + mapnik::marker_svg const& svg = mapnik::util::get(*marker); + auto bbox = svg.bounding_box(); + REQUIRE(bbox == mapnik::box2d(0, 0, 1, 1)); + auto storage = svg.get_data(); + REQUIRE(storage); + mapnik::svg::vertex_stl_adapter stl_storage(storage->source()); + mapnik::svg::svg_path_adapter path(stl_storage); + double x,y; + REQUIRE(path.vertex(&x,&y) == mapnik::SEG_END); + } + SECTION("SVG ") { //