Adding percentage for linear gradient
This commit is contained in:
parent
1f7b961901
commit
0cc524aa1c
2 changed files with 40 additions and 2 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 98464c2d9cbe29cf0b881652abbd9bb40deb71b5
|
||||
Subproject commit 584ecdb679eb2172186f63e90d3826574781d4c8
|
|
@ -63,7 +63,26 @@ TEST_CASE("SVG parser") {
|
|||
REQUIRE(marker->is<mapnik::marker_null>());
|
||||
}
|
||||
|
||||
SECTION("SVG syntax")
|
||||
SECTION("SVG::parse i/o")
|
||||
{
|
||||
std::string svg_name("FAIL");
|
||||
|
||||
using namespace mapnik::svg;
|
||||
mapnik::svg_storage_type path;
|
||||
vertex_stl_adapter<svg_path_storage> stl_storage(path.source());
|
||||
svg_path_adapter svg_path(stl_storage);
|
||||
svg_converter_type svg(svg_path, path.attributes());
|
||||
svg_parser p(svg);
|
||||
|
||||
if (!p.parse(svg_name))
|
||||
{
|
||||
auto const& errors = p.error_messages();
|
||||
REQUIRE(errors.size() == 1);
|
||||
REQUIRE(errors[0] == "Unable to open 'FAIL'");
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("SVG::parse_from_string syntax error")
|
||||
{
|
||||
std::string svg_name("./test/data/svg/invalid.svg");
|
||||
std::ifstream in(svg_name.c_str());
|
||||
|
@ -85,6 +104,25 @@ TEST_CASE("SVG parser") {
|
|||
}
|
||||
}
|
||||
|
||||
SECTION("SVG::parse_from_string syntax error")
|
||||
{
|
||||
std::string svg_name("./test/data/svg/invalid.svg");
|
||||
|
||||
using namespace mapnik::svg;
|
||||
mapnik::svg_storage_type path;
|
||||
vertex_stl_adapter<svg_path_storage> stl_storage(path.source());
|
||||
svg_path_adapter svg_path(stl_storage);
|
||||
svg_converter_type svg(svg_path, path.attributes());
|
||||
svg_parser p(svg);
|
||||
|
||||
if (!p.parse(svg_name))
|
||||
{
|
||||
auto const& errors = p.error_messages();
|
||||
REQUIRE(errors.size() == 1);
|
||||
REQUIRE(errors[0] == "svg_parser::parse - Unable to parse './test/data/svg/invalid.svg'");
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("SVG parser color <fail>")
|
||||
{
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue