|
KiCad PCB EDA Suite
|
#include <memory>#include <set>#include <vector>#include <qa_utils/file_utils.h>#include <qa_utils/wx_utils/unit_test_utils.h>#include <pcbnew_utils/board_test_utils.h>#include <wx/dir.h>#include <wx/filefn.h>#include <wx/filename.h>#include <wx/stdpaths.h>#include <board.h>#include <footprint.h>#include <lib_id.h>#include <pad.h>#include <pgm_base.h>#include <project.h>#include <project_pcb.h>#include <reporter.h>#include <settings/settings_manager.h>#include <footprint_library_adapter.h>#include <io/easyedapro/easyedapro_import_utils.h>#include <kiface_base.h>#include <libraries/library_manager.h>#include <libraries/library_table.h>#include <netlist_reader/board_netlist_updater.h>#include <netlist_reader/pcb_netlist.h>#include <pcbnew_settings.h>#include <pcb_io/allegro/pcb_io_allegro.h>#include <pcb_io/altium/pcb_io_altium_designer.h>#include <pcb_io/pcb_io_mgr.h>#include <pcb_io/eagle/pcb_io_eagle.h>#include <pcb_io/easyedapro/pcb_io_easyedapro_v3.h>#include <pcb_io/kicad_sexpr/pcb_io_kicad_sexpr.h>#include <tool/tool_manager.h>#include <footprint_import_reconciler.h>Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (EagleBoardResolvesToGeneratedCache) | |
| BOOST_AUTO_TEST_CASE (AltiumBoardResolvesToGeneratedCache) | |
| BOOST_AUTO_TEST_CASE (CachedFootprintsMatchPlacedFootprints) | |
| BOOST_AUTO_TEST_CASE (CachedFootprintsMatchPlacedFootprintsWithoutDefinitions) | |
| BOOST_AUTO_TEST_CASE (SourceLibraryMissingAFootprintStillReconciles) | |
| BOOST_AUTO_TEST_CASE (BackSideFootprintsMatchTheirCachedCopy) | |
| BOOST_AUTO_TEST_CASE (BackSideCustomPadMatchesCachedCopy) | |
| BOOST_AUTO_TEST_CASE (CachedCustomPadstackKeepsDefinedLayers) | |
| BOOST_AUTO_TEST_CASE (EasyEdaProV3BoardResolvesToGeneratedCache) | |
| BOOST_AUTO_TEST_CASE (CollidingNicknameDoesNotStealTheLink) | |
| BOOST_AUTO_TEST_CASE (SameNameFromDifferentLibrariesKeepsBothDefinitions) | |
| BOOST_AUTO_TEST_CASE (ExistingUserRowIsNotRepurposed) | |
| BOOST_AUTO_TEST_CASE (ReconciledFootprintsResolveViaNetlistUpdater) | |
| BOOST_AUTO_TEST_CASE | ( | AltiumBoardResolvesToGeneratedCache | ) |
Definition at line 276 of file test_footprint_import_reconciler.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), FOOTPRINT_LIBRARY_ADAPTER::FootprintExists(), PROJECT_PCB::FootprintLibAdapter(), PCB_IO_ALTIUM_DESIGNER::GetImportedCachedLibraryFootprints(), KI_TEST::GetPcbnewTestDataDir(), PGM_BASE::GetSettingsManager(), PCB_IO::LoadAndAppendBoard(), name, KI_TEST::SCOPED_TEMP_DIR::Path(), Pgm(), SETTINGS_MANAGER::Prj(), project, FOOTPRINT_IMPORT_RECONCILER::Reconcile(), and result.
| BOOST_AUTO_TEST_CASE | ( | BackSideCustomPadMatchesCachedCopy | ) |
Definition at line 553 of file test_footprint_import_reconciler.cpp.
References BOARD::Add(), FOOTPRINT::Add(), ANGLE_90, BOOST_REQUIRE(), CIRCLE, CUSTOM, BOARD_ITEM::DRC, F_Cu, FOOTPRINT::Flip(), FOOTPRINT, PROJECT_PCB::FootprintLibAdapter(), FOOTPRINT::FootprintNeedsUpdate(), FOOTPRINT::GetPosition(), PGM_BASE::GetSettingsManager(), KIFACE_BASE::InitSettings(), Kiface(), LEFT_RIGHT, FOOTPRINT_LIBRARY_ADAPTER::LoadFootprint(), PCBNEW_SETTINGS::m_FlipDirection, PAD, pad, KI_TEST::SCOPED_TEMP_DIR::Path(), Pgm(), SETTINGS_MANAGER::Prj(), project, RESTORE, FOOTPRINT::Rotate(), FOOTPRINT::SetFPID(), BOARD::SetProject(), SMD, and PAD::SMDMask().
| BOOST_AUTO_TEST_CASE | ( | BackSideFootprintsMatchTheirCachedCopy | ) |
Definition at line 474 of file test_footprint_import_reconciler.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_ITEM::DRC, F_Cu, PROJECT_PCB::FootprintLibAdapter(), PCB_IO_ALTIUM_DESIGNER::GetImportedCachedLibraryFootprints(), KI_TEST::GetPcbnewTestDataDir(), PGM_BASE::GetSettingsManager(), KIFACE_BASE::InitSettings(), Kiface(), LEFT_RIGHT, PCB_IO::LoadAndAppendBoard(), PCB_IO::LoadBoard(), FOOTPRINT_LIBRARY_ADAPTER::LoadFootprint(), PCBNEW_SETTINGS::m_FlipDirection, KI_TEST::SCOPED_TEMP_DIR::Path(), Pgm(), SETTINGS_MANAGER::Prj(), project, FOOTPRINT_IMPORT_RECONCILER::Reconcile(), RESTORE, and PCB_IO_KICAD_SEXPR::SaveBoard().
| BOOST_AUTO_TEST_CASE | ( | CachedCustomPadstackKeepsDefinedLayers | ) |
Definition at line 604 of file test_footprint_import_reconciler.cpp.
References BOARD::Add(), FOOTPRINT::Add(), BOOST_REQUIRE(), PADSTACK::CUSTOM, F_Cu, FOOTPRINT, PROJECT_PCB::FootprintLibAdapter(), PGM_BASE::GetSettingsManager(), FOOTPRINT_LIBRARY_ADAPTER::LoadFootprint(), NPTH, PAD, pad, KI_TEST::SCOPED_TEMP_DIR::Path(), Pgm(), SETTINGS_MANAGER::Prj(), project, FOOTPRINT::SetFPID(), BOARD::SetProject(), and PAD::UnplatedHoleMask().
| BOOST_AUTO_TEST_CASE | ( | CachedFootprintsMatchPlacedFootprints | ) |
Definition at line 333 of file test_footprint_import_reconciler.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_ITEM::DRC, PROJECT_PCB::FootprintLibAdapter(), PCB_IO_ALTIUM_DESIGNER::GetImportedCachedLibraryFootprints(), KI_TEST::GetPcbnewTestDataDir(), PGM_BASE::GetSettingsManager(), PCB_IO::LoadAndAppendBoard(), FOOTPRINT_LIBRARY_ADAPTER::LoadFootprint(), KI_TEST::SCOPED_TEMP_DIR::Path(), Pgm(), SETTINGS_MANAGER::Prj(), project, and FOOTPRINT_IMPORT_RECONCILER::Reconcile().
| BOOST_AUTO_TEST_CASE | ( | CachedFootprintsMatchPlacedFootprintsWithoutDefinitions | ) |
Definition at line 383 of file test_footprint_import_reconciler.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOARD_ITEM::DRC, PROJECT_PCB::FootprintLibAdapter(), KI_TEST::GetPcbnewTestDataDir(), PGM_BASE::GetSettingsManager(), PCB_IO::LoadBoard(), FOOTPRINT_LIBRARY_ADAPTER::LoadFootprint(), KI_TEST::SCOPED_TEMP_DIR::Path(), Pgm(), SETTINGS_MANAGER::Prj(), project, and FOOTPRINT_IMPORT_RECONCILER::Reconcile().
| BOOST_AUTO_TEST_CASE | ( | CollidingNicknameDoesNotStealTheLink | ) |
Definition at line 704 of file test_footprint_import_reconciler.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), PROJECT_PCB::FootprintLibAdapter(), PGM_BASE::GetSettingsManager(), FOOTPRINT_LIBRARY_ADAPTER::LoadFootprint(), FOOTPRINT::Pads(), KI_TEST::SCOPED_TEMP_DIR::Path(), Pgm(), SETTINGS_MANAGER::Prj(), project, FOOTPRINT_IMPORT_RECONCILER::Reconcile(), result, and FOOTPRINT::SetFPID().
| BOOST_AUTO_TEST_CASE | ( | EagleBoardResolvesToGeneratedCache | ) |
Definition at line 200 of file test_footprint_import_reconciler.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), FOOTPRINT_LIBRARY_ADAPTER::FootprintExists(), PROJECT_PCB::FootprintLibAdapter(), KI_TEST::GetEeschemaTestDataDir(), PCB_IO_EAGLE::GetImportedCachedLibraryFootprints(), PGM_BASE::GetSettingsManager(), LIBRARY_TABLE::HasRow(), FILEEXT::KiCadFootprintLibPathExtension, PCB_IO::LoadAndAppendBoard(), name, KI_TEST::SCOPED_TEMP_DIR::Path(), Pgm(), SETTINGS_MANAGER::Prj(), project, LIBRARY_MANAGER_ADAPTER::ProjectTable(), FOOTPRINT_IMPORT_RECONCILER::Reconcile(), and result.
| BOOST_AUTO_TEST_CASE | ( | EasyEdaProV3BoardResolvesToGeneratedCache | ) |
Definition at line 641 of file test_footprint_import_reconciler.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), FOOTPRINT_LIBRARY_ADAPTER::FootprintExists(), PROJECT_PCB::FootprintLibAdapter(), BOARD::Footprints(), PGM_BASE::GetSettingsManager(), LIBRARY_TABLE::HasRow(), FILEEXT::KiCadFootprintLibPathExtension, name, KI_TEST::SCOPED_TEMP_DIR::Path(), KI_TEST::SCOPED_TEMP_DIR::PathStr(), Pgm(), SETTINGS_MANAGER::Prj(), project, LIBRARY_MANAGER_ADAPTER::ProjectTable(), FOOTPRINT_IMPORT_RECONCILER::Reconcile(), result, and EASYEDAPRO::ShortenLibName().
| BOOST_AUTO_TEST_CASE | ( | ExistingUserRowIsNotRepurposed | ) |
Definition at line 849 of file test_footprint_import_reconciler.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), PROJECT_PCB::FootprintLibAdapter(), PGM_BASE::GetSettingsManager(), FILEEXT::KiCadFootprintLibPathExtension, KI_TEST::SCOPED_TEMP_DIR::Path(), Pgm(), SETTINGS_MANAGER::Prj(), project, LIBRARY_MANAGER_ADAPTER::ProjectTable(), FOOTPRINT_IMPORT_RECONCILER::Reconcile(), result, FOOTPRINT::SetFPID(), table, and LIBRARY_TABLE_ROW::URI().
| BOOST_AUTO_TEST_CASE | ( | ReconciledFootprintsResolveViaNetlistUpdater | ) |
Definition at line 892 of file test_footprint_import_reconciler.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), COMPONENT, PROJECT_PCB::FootprintLibAdapter(), KI_TEST::GetEeschemaTestDataDir(), BOARD_NETLIST_UPDATER::GetErrorCount(), PCB_IO_EAGLE::GetImportedCachedLibraryFootprints(), PGM_BASE::GetSettingsManager(), LIB_ID::GetUniStringLibId(), LIB_ID::GetUniStringLibItemName(), PCB_IO::LoadAndAppendBoard(), netlist, KI_TEST::SCOPED_TEMP_DIR::Path(), Pgm(), SETTINGS_MANAGER::Prj(), project, FOOTPRINT_IMPORT_RECONCILER::Reconcile(), TOOL_MANAGER::RegisterTool(), reporter, BOARD_NETLIST_UPDATER::SetDeleteUnusedFootprints(), TOOL_MANAGER::SetEnvironment(), BOARD_NETLIST_UPDATER::SetIsDryRun(), BOARD_NETLIST_UPDATER::SetReplaceFootprints(), BOARD_NETLIST_UPDATER::SetReporter(), BOARD_NETLIST_UPDATER::SetWillDrag(), and BOARD_NETLIST_UPDATER::UpdateNetlist().
| BOOST_AUTO_TEST_CASE | ( | SameNameFromDifferentLibrariesKeepsBothDefinitions | ) |
Definition at line 743 of file test_footprint_import_reconciler.cpp.
References APPEND, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), FOOTPRINT::Clone(), PROJECT_PCB::FootprintLibAdapter(), FOOTPRINT::GetFPID(), KI_TEST::GetPcbnewTestDataDir(), PGM_BASE::GetSettingsManager(), LIB_ID::GetUniStringLibItemName(), LIB_ID::GetUniStringLibNickname(), PCB_IO::LoadAndAppendBoard(), FOOTPRINT_LIBRARY_ADAPTER::LoadFootprint(), FOOTPRINT::Pads(), KI_TEST::SCOPED_TEMP_DIR::Path(), Pgm(), SETTINGS_MANAGER::Prj(), project, FOOTPRINT_IMPORT_RECONCILER::Reconcile(), reporter, result, FOOTPRINT::SetFPID(), and source.
| BOOST_AUTO_TEST_CASE | ( | SourceLibraryMissingAFootprintStillReconciles | ) |
Definition at line 423 of file test_footprint_import_reconciler.cpp.
References PCB_IO_MGR::ALTIUM_DESIGNER, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), FOOTPRINT, PROJECT_PCB::FootprintLibAdapter(), PCB_IO_ALTIUM_DESIGNER::GetImportedCachedLibraryFootprints(), PGM_BASE::GetLibraryManager(), KI_TEST::GetPcbnewTestDataDir(), PGM_BASE::GetSettingsManager(), PCB_IO::LoadAndAppendBoard(), LIBRARY_MANAGER::LoadProjectTables(), KI_TEST::SCOPED_TEMP_DIR::Path(), Pgm(), SETTINGS_MANAGER::Prj(), PROJECT, project, FOOTPRINT_IMPORT_RECONCILER::Reconcile(), result, LIBRARY_TABLE_ROW::SetNickname(), LIBRARY_TABLE_ROW::SetType(), LIBRARY_TABLE_ROW::SetURI(), PCB_IO_MGR::ShowType(), LIBRARY_MANAGER::Table(), and table.