25#include <boost/test/data/test_case.hpp>
36struct GROUP_LOAD_TEST_CASE
41 bool m_expectedLocked;
42 wxString m_expectedName;
43 unsigned m_expectedMemberCount;
50 std::vector<GROUP_LOAD_TEST_CASE> m_groupCases;
54const std::vector<GROUP_LOAD_BOARD_TEST_CASE> GroupsLoadSave_testCases{
61 "a78cc65c-451e-451e-9147-4460cc669685",
71 "groups_load_save_v20231212",
76 "a78cc65c-451e-451e-9147-4460cc669685",
100 const auto doBoardTest = [&](
const BOARD& aBoard )
102 for(
const GROUP_LOAD_TEST_CASE& groupTestCase : testCase.m_groupCases )
105 << groupTestCase.m_searchUuid.AsString()
106 <<
" and name: " << groupTestCase.m_expectedName );
109 aBoard,
PCB_GROUP_T, groupTestCase.m_searchUuid ) );
118 testCase.m_ExpectedBoardVersion );
General utilities for PCB file IO for QA programs.
Information pertinent to a Pcbnew printed circuit board.
A set of BOARD_ITEMs (i.e., without duplicates).
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.
Class to handle a set of BOARD_ITEMs.
BOOST_CHECK_EQUAL(ret, c.m_exp_result)
BOOST_DATA_TEST_CASE(GroupsLoadSave, boost::unit_test::data::make(GroupsLoadSave_testCases), testCase)
This is similar to group_saveload.cpp's HealthyGroups, but runs the other way around: it loads a fixe...
BOOST_TEST_MESSAGE("Polyline has "<< chain.PointCount()<< " points")
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs