From 7aa30a211e9593bdf45cf271ce0a6497660b842f Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 22 Jul 2015 13:29:04 +0200 Subject: [PATCH] SGV tests: - update expected path data --- test/unit/svg/svg_parser_test.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/test/unit/svg/svg_parser_test.cpp b/test/unit/svg/svg_parser_test.cpp index 8ff4013bd..bc8f65665 100644 --- a/test/unit/svg/svg_parser_test.cpp +++ b/test/unit/svg/svg_parser_test.cpp @@ -342,7 +342,7 @@ TEST_CASE("SVG parser") { REQUIRE(marker->is()); mapnik::marker_svg const& svg = mapnik::util::get(*marker); auto bbox = svg.bounding_box(); - REQUIRE(bbox == mapnik::box2d(1.0,1.0,799.0,399.0)); + REQUIRE(bbox == mapnik::box2d(1.0,1.0,799.0,599.0)); auto storage = svg.get_data(); REQUIRE(storage); mapnik::svg::vertex_stl_adapter stl_storage(storage->source()); @@ -357,17 +357,25 @@ TEST_CASE("SVG parser") { cmd = path.vertex(&x,&y); vec.emplace_back(x, y, cmd); } + std::vector> expected = {std::make_tuple(1, 1, 1), std::make_tuple(799, 1, 2), - std::make_tuple(799, 399, 2), - std::make_tuple(1, 399, 2), + std::make_tuple(799, 599, 2), + std::make_tuple(1, 599, 2), std::make_tuple(1, 1, 79), std::make_tuple(0, 0, 0), std::make_tuple(100, 100, 1), std::make_tuple(700, 100, 2), std::make_tuple(700, 300, 2), std::make_tuple(100, 300, 2), - std::make_tuple(100, 100, 79)}; + std::make_tuple(100, 100, 79), + std::make_tuple(0, 0, 0), + std::make_tuple(100, 320, 1), + std::make_tuple(700, 320, 2), + std::make_tuple(700, 520, 2), + std::make_tuple(100, 520, 2), + std::make_tuple(100, 320, 79)}; + REQUIRE(std::equal(expected.begin(),expected.end(), vec.begin())); }