25#include <boost/test/data/test_case.hpp>
36struct GENERATOR_LOAD_TEST_CASE
41 bool m_expectedLocked;
42 wxString m_expectedName;
43 unsigned m_expectedMemberCount;
50 std::vector<GENERATOR_LOAD_TEST_CASE> m_generatorCases;
53const std::vector<GENERATOR_LOAD_BOARD_TEST_CASE> GeneratorLoading_testCases{
55 "tuning_generators_load_save",
60 "4f22a815-3048-42b3-86fa-eb71720d35ae",
70 "tuning_generators_load_save_v20231212",
75 "4f22a815-3048-42b3-86fa-eb71720d35ae",
89 const auto doBoardTest = [&](
const BOARD& aBoard )
91 for(
const GENERATOR_LOAD_TEST_CASE& testCase : testCase.m_generatorCases )
94 "Checking for generator with UUID: " << testCase.m_searchUuid.AsString() );
96 const auto& generator =
102 BOOST_CHECK_EQUAL( generator.GetItems().size(), testCase.m_expectedMemberCount );
107 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_CHECK_EQUAL(ret, c.m_exp_result)
BOOST_DATA_TEST_CASE(GeneratorLoading, boost::unit_test::data::make(GeneratorLoading_testCases), testCase)
BOOST_TEST_MESSAGE("Polyline has "<< chain.PointCount()<< " points")
@ PCB_GENERATOR_T
class PCB_GENERATOR, generator on a layer