|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <pcbnew_utils/board_test_utils.h>#include <diff_merge/pcb_differ.h>#include <diff_merge/pcb_geometry_extractor.h>#include <board.h>#include <board_item.h>#include <pad.h>#include <pcb_track.h>#include <footprint.h>#include <settings/settings_manager.h>#include <nlohmann/json.hpp>#include <map>Go to the source code of this file.
Classes | |
| struct | PCB_DIFFER_FIXTURE |
| Fixture: loads the same canonical board into two separate BOARD instances so tests can mutate one and diff against the other. More... | |
Functions | |
| BOOST_AUTO_TEST_CASE (TwoFreshLoadsAreIdentical) | |
| BOOST_AUTO_TEST_CASE (RemovingAnItemSurfacesAsRemoved) | |
| BOOST_AUTO_TEST_CASE (WidthChangeProducesPropertyDelta) | |
| BOOST_AUTO_TEST_CASE (RoutingChangesCarryNetNamesForPresentationGrouping) | |
| BOOST_AUTO_TEST_CASE (ChildEditOnFootprintNestsUnderFootprintRecord) | |
| BOOST_AUTO_TEST_CASE (DiffOutputIsDeterministic) | |
| BOOST_AUTO_TEST_CASE (DiffJsonRoundTrip) | |
| BOOST_AUTO_TEST_CASE (ExtractedGeometryCarriesBoardLayers) | |
| BOOST_AUTO_TEST_CASE | ( | ChildEditOnFootprintNestsUnderFootprintRecord | ) |
Definition at line 216 of file test_pcb_differ.cpp.
References KIID::AsString(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KICAD_DIFF::PCB_DIFFER::Diff(), EDA_ITEM::m_Uuid, KICAD_DIFF::MODIFIED, pad, FOOTPRINT::Pads(), PCB_FOOTPRINT_T, and result.
| BOOST_AUTO_TEST_CASE | ( | DiffJsonRoundTrip | ) |
Definition at line 281 of file test_pcb_differ.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KICAD_DIFF::DOCUMENT_DIFF::changes, KICAD_DIFF::PCB_DIFFER::Diff(), KICAD_DIFF::DOCUMENT_DIFF::docType, KICAD_DIFF::DOCUMENT_DIFF::FromJson(), PCB_TRACK::GetWidth(), KICAD_DIFF::DOCUMENT_DIFF::path, PCB_TRACE_T, result, and PCB_TRACK::SetWidth().
| BOOST_AUTO_TEST_CASE | ( | DiffOutputIsDeterministic | ) |
Definition at line 254 of file test_pcb_differ.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KICAD_DIFF::PCB_DIFFER::Diff(), PCB_TRACK::GetWidth(), PCB_TRACE_T, PCB_TRACK::SetWidth(), and KICAD_DIFF::DOCUMENT_DIFF::ToJson().
| BOOST_AUTO_TEST_CASE | ( | ExtractedGeometryCarriesBoardLayers | ) |
Definition at line 312 of file test_pcb_differ.cpp.
References BOOST_REQUIRE(), KICAD_DIFF::DOCUMENT_GEOMETRY::Empty(), KICAD_DIFF::ExtractBoardGeometry(), KICAD_DIFF::GeometryLayerSet(), KICAD_DIFF::DOCUMENT_SEGMENT::layers, and KICAD_DIFF::DOCUMENT_GEOMETRY::segments.
| BOOST_AUTO_TEST_CASE | ( | RemovingAnItemSurfacesAsRemoved | ) |
Definition at line 86 of file test_pcb_differ.cpp.
References KIID::AsString(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KICAD_DIFF::PCB_DIFFER::Diff(), EDA_ITEM::m_Uuid, NORMAL, PCB_TRACE_T, KICAD_DIFF::REMOVED, and result.
| BOOST_AUTO_TEST_CASE | ( | RoutingChangesCarryNetNamesForPresentationGrouping | ) |
Definition at line 161 of file test_pcb_differ.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KICAD_DIFF::PCB_DIFFER::Diff(), BOARD_CONNECTED_ITEM::GetNetCode(), BOARD_CONNECTED_ITEM::GetNetname(), PCB_TRACK::GetWidth(), PCB_TRACE_T, PCB_VIA_T, KICAD_DIFF::ITEM_CHANGE::refdes, result, PCB_TRACK::SetWidth(), and KICAD_DIFF::ITEM_CHANGE::typeName.
| BOOST_AUTO_TEST_CASE | ( | TwoFreshLoadsAreIdentical | ) |
Definition at line 74 of file test_pcb_differ.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_CHECK_MESSAGE(), KICAD_DIFF::PCB_DIFFER::Diff(), and result.
| BOOST_AUTO_TEST_CASE | ( | WidthChangeProducesPropertyDelta | ) |
Definition at line 118 of file test_pcb_differ.cpp.
References KICAD_DIFF::PROPERTY_DELTA::after, KICAD_DIFF::DIFF_VALUE::AsInt(), KIID::AsString(), KICAD_DIFF::PROPERTY_DELTA::before, BOOST_CHECK_EQUAL(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), KICAD_DIFF::PCB_DIFFER::Diff(), PCB_TRACK::GetWidth(), EDA_ITEM::m_Uuid, KICAD_DIFF::MODIFIED, KICAD_DIFF::PROPERTY_DELTA::name, PCB_TRACE_T, result, and PCB_TRACK::SetWidth().