KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_svg_import.cpp File Reference

Go to the source code of this file.

Classes

class  SVG_IMPORT_TEST_IMPORTER
 

Functions

 BOOST_AUTO_TEST_CASE (SingleNodeClosedPath)
 Regression test for https://gitlab.com/kicad/code/kicad/-/issues/11445.
 
 BOOST_AUTO_TEST_CASE (MultiNodeClosedPath)
 Verify that a normal multi-node closed path still imports correctly after the single-node fix.
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( MultiNodeClosedPath )

Verify that a normal multi-node closed path still imports correctly after the single-node fix.

Definition at line 154 of file test_svg_import.cpp.

References BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), SVG_IMPORT_PLUGIN::Import(), SVG_IMPORT_PLUGIN::LoadFromMemory(), SVG_IMPORT_TEST_IMPORTER::m_polygons, and GRAPHICS_IMPORT_PLUGIN::SetImporter().

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( SingleNodeClosedPath )

Regression test for https://gitlab.com/kicad/code/kicad/-/issues/11445.

A closed SVG path with a single anchor node (one cubic bezier from a point back to itself) was not imported because the adaptive bezier subdivision failed when start == end, producing only degenerate zero-area polygons.

Definition at line 91 of file test_svg_import.cpp.

References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), SVG_IMPORT_PLUGIN::Import(), SVG_IMPORT_PLUGIN::LoadFromMemory(), SVG_IMPORT_TEST_IMPORTER::m_polygons, and GRAPHICS_IMPORT_PLUGIN::SetImporter().