diff --git a/test/unit/svg/svg_path_parser_test.cpp b/test/unit/svg/svg_path_parser_test.cpp index e877f6063..7352a7a47 100644 --- a/test/unit/svg/svg_path_parser_test.cpp +++ b/test/unit/svg/svg_path_parser_test.cpp @@ -161,4 +161,33 @@ TEST_CASE("SVG path parser") { std::make_tuple(1050, 125, 2)}; test_path_parser(str, expected); } + + SECTION("Quadratic Bézier") + { + std::string str = "M200,300 Q400,50 600,300 T1000,300"; + + std::vector> expected = { + std::make_tuple(200, 300, 1), + std::make_tuple(400, 50, 3), + std::make_tuple(600, 300, 3), + std::make_tuple(800, 550, 3), + std::make_tuple(1000, 300, 3)}; + test_path_parser(str, expected); + } + + SECTION("Cubic Bézier") + { + std::string str = "M100,200 C100,100 250,100 250,200S400,300 400,200"; + + std::vector> expected = { + std::make_tuple(100, 200, 1), + std::make_tuple(100, 100, 4), + std::make_tuple(250, 100, 4), + std::make_tuple(250, 200, 4), + std::make_tuple(250, 300, 4), + std::make_tuple(400, 300, 4), + std::make_tuple(400, 200, 4)}; + + test_path_parser(str, expected); + } }