22#include <boost/test/data/test_case.hpp>
55 "Fake Board file (KiCad *Legacy* / EAGLE file ext)",
56 "plugins/fakeboard.brd",
60 "Fake Board file (KiCad file ext)",
61 "plugins/fakeboard.kicad_pcb",
65 "Fake Board file (PCAD file ext)",
66 "plugins/fakeboard.pcb",
70 "Fake Board file (CADSTAR file ext)",
71 "plugins/fakeboard.cpa",
75 "Fake Board file (Altium Circuit Studio file ext)",
76 "plugins/fakeboard.CSPcbDoc",
80 "Fake Board file (Altium Circuit Maker file ext)",
81 "plugins/fakeboard.CMPcbDoc",
85 "Fake Board file (Altium Designer file ext)",
86 "plugins/fakeboard.PcbDoc",
91 "Fake Board file (Solid Works PCB file ext)",
92 "plugins/fakeboard.SWPcbDoc",
101 "Basic KiCad *Legacy* board file",
102 "plugins/legacy_demos/flat_hierarchy/flat_hierarchy.brd",
106 "Basic KiCad board file",
107 "complex_hierarchy.kicad_pcb",
111 "Basic Eagle board file",
112 "plugins/eagle/Adafruit-AHT20-PCB/Adafruit AHT20 Temperature & Humidity.brd",
116 "Basic PCAD board file",
117 "plugins/pcad/pcad_4layer_glyph_test_ascii.PCB",
121 "Basic CADSTAR board file",
122 "plugins/cadstar/route_offset/minimal_route_offset_curved_track.cpa",
126 "Basic EasyEDA Std board json file",
127 "plugins/easyeda/PCB_USBMETER-PD QC修改版_2023-09-02.json",
131 "Basic EasyEDA Std backup file",
132 "plugins/easyeda/BackupProjects_ESP32-PICO-D4_smart_watch.zip",
136 "Basic EasyEDA Pro zip board project",
137 "plugins/easyedapro/Scanning Tunneling Microscope OpenSTM ControlBoard.zip",
141 "Basic EasyEDA Pro epro project",
142 "plugins/easyedapro/ProProject_Yuzuki Chameleon_2023-09-02.epro",
146 "Basic Altium Designer board file",
147 "plugins/altium/eDP_adapter_dvt1_source/eDP_adapter_dvt1.PcbDoc",
160 "Non-Library file (KiCad *Legacy* / EAGLE file ext)",
161 "plugins/fakeboard.brd",
165 "Non-Library file (KiCad file ext)",
166 "plugins/fakeboard.kicad_pcb",
170 "Non-Library file (PCAD file ext)",
171 "plugins/fakeboard.pcb",
175 "Non-Library file (CADSTAR file ext)",
176 "plugins/fakeboard.cpa",
180 "Non-Library file (Altium Circuit Studio file ext)",
181 "plugins/fakeboard.CSPcbDoc",
185 "Non-Library file (Altium Circuit Maker file ext)",
186 "plugins/fakeboard.CMPcbDoc",
190 "Non-Library file (Altium Designer file ext)",
191 "plugins/fakeboard.PcbDoc",
196 "Non-Library file (Solid Works PCB file ext)",
197 "plugins/fakeboard.SWPcbDoc",
206 "Basic KiCad footprint .pretty library",
207 "plugins/eagle/lbr/SparkFun-GPS.pretty",
211 "Basic Eagle library file",
212 "plugins/eagle/lbr/SparkFun-GPS.lbr",
216 "Basic CADSTAR PCB Archive library file",
217 "plugins/cadstar/lib/footprint-with-thermal-pad.cpa",
221 "Basic EasyEDA Std board json file",
222 "plugins/easyeda/PCB_USBMETER-PD QC修改版_2023-09-02.json",
226 "Basic EasyEDA Std backup file",
227 "plugins/easyeda/BackupProjects_ESP32-PICO-D4_smart_watch.zip",
231 "Basic EasyEDA Pro zip board project",
232 "plugins/easyedapro/Scanning Tunneling Microscope OpenSTM ControlBoard.zip",
236 "Basic EasyEDA Pro epro project",
237 "plugins/easyedapro/ProProject_Yuzuki Chameleon_2023-09-02.epro",
241 "Altium Designer 'Espressif ESP32-WROOM-32.PcbLib' library file",
242 "plugins/altium/pcblib/Espressif ESP32-WROOM-32.PcbLib",
246 "Altium Designer 'Tracks.v6.PcbLib' library file",
247 "plugins/altium/pcblib/Tracks.v6.PcbLib",
292 bool expectValidHeader = c.m_expected_type == entry.m_type;
General utilities for PCB file IO for QA programs.
const std::vector< ENTRY > & AllPlugins() const
static PLUGIN_REGISTRY * Instance()
static PCB_IO * PluginFind(PCB_FILE_T aFileType)
Return a #PLUGIN which the caller can use to import, export, save, or load design documents.
PCB_FILE_T
The set of file types that the PCB_IO_MGR knows about, and for which there has been a plugin written,...
@ KICAD_SEXP
S-expression Pcbnew file format.
@ LEGACY
Legacy Pcbnew file formats prior to s-expression.
static PCB_FILE_T FindPluginTypeFromBoardPath(const wxString &aFileName, int aCtl=0)
Return a plugin type given a path for a board file.
static PCB_FILE_T GuessPluginTypeFromLibPath(const wxString &aLibPath, int aCtl=0)
Return a plugin type given a footprint library's libPath.
std::unique_ptr< T > IO_RELEASER
Helper to hold and release an IO_BASE object when exceptions are thrown.
std::string GetPcbnewTestDataDir()
Utility which returns a path to the data directory where the test board files are stored.
std::string m_file_rel_path
PCB_IO_MGR::PCB_FILE_T m_expected_type
friend std::ostream & operator<<(std::ostream &os, const PCB_IO_PLUGIN_CASE &aCase)
BOOST_DATA_TEST_CASE(ConvertToKicadUnit, boost::unit_test::data::make(altium_to_kicad_unit), input_value, expected_result)
Test conversation from Altium internal units into KiCad internal units.
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END()
static const std::vector< PCB_IO_PLUGIN_CASE > BoardPluginCases
BOOST_CHECK_EQUAL(PCB_IO_MGR::FindPluginTypeFromBoardPath(dataPath), c.m_expected_type)
static const std::vector< PCB_IO_PLUGIN_CASE > LibraryPluginCases
BOOST_TEST_CONTEXT("Test Clearance")