35struct FOOTPRINT_LOAD_TEST_FIXTURE
37 FOOTPRINT_LOAD_TEST_FIXTURE() {}
41struct FOOTPRINT_LOAD_TEST_CASE
46 bool m_expectedLocked;
51struct FOOTPRINT_LOAD_BOARD_TEST_CASE
54 wxString m_boardFileRelativePath;
56 std::vector<FOOTPRINT_LOAD_TEST_CASE> m_imageCases;
63 const std::vector<FOOTPRINT_LOAD_BOARD_TEST_CASE> testCases{
65 "footprints_load_save",
69 "898cf321-03c7-40bb-8d78-4bc5e52986c2",
74 "0775cd70-2e84-4592-a160-456c37a8f4f6",
82 for(
const FOOTPRINT_LOAD_BOARD_TEST_CASE& testCase : testCases )
84 const auto doBoardTest = [&](
const BOARD& aBoard )
86 for(
const FOOTPRINT_LOAD_TEST_CASE& fooprintTestCase : testCase.m_imageCases )
88 BOOST_TEST_MESSAGE(
"Checking for footprint with UUID: "
89 << fooprintTestCase.m_footprintUuid.AsString() );
94 BOOST_CHECK_EQUAL(
image.IsLocked(), fooprintTestCase.m_expectedLocked );
95 BOOST_CHECK_EQUAL(
image.GetPosition(), fooprintTestCase.m_expectedPos * 1000000 );
General utilities for PCB file IO for QA programs.
Information pertinent to a Pcbnew printed circuit board.
void LoadAndTestBoardFile(const wxString aRelativePath, bool aRoundtrip, std::function< void(BOARD &)> aBoardTestFunction, std::optional< int > aExpectedBoardVersion)
Perform "some test" on a board file loaded from the path, then optionally save and reload and run the...
BOARD_ITEM & RequireBoardItemWithTypeAndId(const BOARD &aBoard, KICAD_T aItemType, const KIID &aID)
Get an item from the given board with a certain type and UUID.
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint