21#include <boost/test/data/test_case.hpp>
32struct GENERATOR_LOAD_TEST_CASE
37 bool m_expectedLocked;
38 wxString m_expectedName;
39 unsigned m_expectedMemberCount;
46 std::vector<GENERATOR_LOAD_TEST_CASE> m_generatorCases;
49const std::vector<GENERATOR_LOAD_BOARD_TEST_CASE> GeneratorLoading_testCases{
51 "tuning_generators_load_save",
56 "4f22a815-3048-42b3-86fa-eb71720d35ae",
66 "tuning_generators_load_save_v20231212",
71 "4f22a815-3048-42b3-86fa-eb71720d35ae",
85 const auto doBoardTest = [&](
const BOARD& aBoard )
87 for(
const GENERATOR_LOAD_TEST_CASE& testCase : testCase.m_generatorCases )
90 "Checking for generator with UUID: " << testCase.m_searchUuid.
AsString() );
92 const auto& generator =
103 testCase.m_ExpectedBoardVersion );
General utilities for PCB file IO for QA programs.
Information pertinent to a Pcbnew printed circuit board.
wxString AsString() const
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(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
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