|
KiCad PCB EDA Suite
|
#include <filesystem>#include <string>#include <pcbnew_utils/board_test_utils.h>#include <pcbnew_utils/board_file_utils.h>#include <qa_utils/wx_utils/unit_test_utils.h>#include <pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.h>#include <board.h>#include <pcb_shape.h>#include <zone.h>Go to the source code of this file.
Classes | |
| struct | KICAD_SEXPR_FIXTURE |
Functions | |
| BOOST_AUTO_TEST_CASE (Issue19775_ZoneLayerWildcards) | |
| Declares the struct as the Boost test fixture. | |
| BOOST_AUTO_TEST_CASE (Issue23125_EmptyZoneDiscarded) | |
| Verify that zones with no polygon outline are silently discarded during loading rather than being added to the board where they would cause crashes in GetPosition(). | |
| BOOST_AUTO_TEST_CASE (ScientificNotationLoading) | |
| Verify the parser still can read floating point values written in scientific notation. | |
| BOOST_AUTO_TEST_CASE | ( | Issue19775_ZoneLayerWildcards | ) |
Declares the struct as the Boost test fixture.
Compare all footprints declared in a *.lbr file with their KiCad reference footprint
Definition at line 55 of file test_kicad_sexpr.cpp.
References B_Cu, BOOST_AUTO_TEST_CASE(), BOOST_TEST_CONTEXT(), LSET::Contains(), F_Cu, ZONE::GetFilledPolysList(), ZONE::GetLayerSet(), KI_TEST::GetPcbnewTestDataDir(), ZONE::LayerProperties(), and SHAPE_POLY_SET::TotalVertices().
| BOOST_AUTO_TEST_CASE | ( | Issue23125_EmptyZoneDiscarded | ) |
Verify that zones with no polygon outline are silently discarded during loading rather than being added to the board where they would cause crashes in GetPosition().
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/23125
Definition at line 112 of file test_kicad_sexpr.cpp.
References BOOST_CHECK_EQUAL(), ZONE::GetNumCorners(), KI_TEST::GetPcbnewTestDataDir(), and ZONE::GetPosition().
| BOOST_AUTO_TEST_CASE | ( | ScientificNotationLoading | ) |
Verify the parser still can read floating point values written in scientific notation.
Even though the KiCad file writter doesn't write using scientific notation anymore, at one point it did, so the parser must still support reading it.
Definition at line 137 of file test_kicad_sexpr.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST(), EDA_SHAPE::GetArcMid(), KI_TEST::GetPcbnewTestDataDir(), VECTOR2< T >::x, and VECTOR2< T >::y.