35struct GENERATOR_LOAD_TEST_FIXTURE
37 GENERATOR_LOAD_TEST_FIXTURE() {}
41struct GENERATOR_LOAD_TEST_CASE
46 bool m_expectedLocked;
47 wxString m_expectedName;
48 unsigned m_expectedMemberCount;
52struct GENERATOR_LOAD_BOARD_TEST_CASE
55 wxString m_boardFileRelativePath;
59 int m_expectedBoardVersion;
62 std::vector<GENERATOR_LOAD_TEST_CASE> m_generatorCases;
69 const std::vector<GENERATOR_LOAD_BOARD_TEST_CASE> testCases{
71 "tuning_generators_load_save",
76 "4f22a815-3048-42b3-86fa-eb71720d35ae",
86 "tuning_generators_load_save_v20231212",
91 "4f22a815-3048-42b3-86fa-eb71720d35ae",
100 for(
const GENERATOR_LOAD_BOARD_TEST_CASE& testCase : testCases )
102 const auto doBoardTest = [&](
const BOARD& aBoard )
104 for(
const GENERATOR_LOAD_TEST_CASE& testCase : testCase.m_generatorCases )
107 "Checking for generator with UUID: " << testCase.m_searchUuid.AsString() );
109 const auto& generator =
113 BOOST_CHECK_EQUAL( generator.IsLocked(), testCase.m_expectedLocked );
114 BOOST_CHECK_EQUAL( generator.GetName(), testCase.m_expectedName );
115 BOOST_CHECK_EQUAL( generator.GetItems().size(), testCase.m_expectedMemberCount );
120 testCase.m_expectedBoardVersion );
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.
BOOST_FIXTURE_TEST_CASE(GeneratorLoading, GENERATOR_LOAD_TEST_FIXTURE)
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer