35struct GRAPHICS_LOAD_TEST_CASE
40 bool m_expectedFilled;
44struct GRAPHICS_LOAD_BOARD_TEST_CASE
47 wxString m_boardFileRelativePath;
51 int m_expectedBoardVersion;
54 std::vector<GRAPHICS_LOAD_TEST_CASE> m_generatorCases;
61 const std::vector<GRAPHICS_LOAD_BOARD_TEST_CASE> testCases{
65 "graphics_load_save_v20240108",
70 "65596b4f-7b03-48e9-8be7-5824316ea7fd",
75 "cf265305-49c9-43d8-bb2a-ad34997b22d6",
80 "d0669ae2-442f-427f-af0f-bc3008af779a",
85 "fd1649a3-9a92-4dd3-96b4-88469cb257ba",
92 for(
const GRAPHICS_LOAD_BOARD_TEST_CASE& testCase : testCases )
94 const auto doBoardTest = [&](
const BOARD& aBoard )
96 for(
const GRAPHICS_LOAD_TEST_CASE& testCase : testCase.m_generatorCases )
99 "Checking for graphic with UUID: " << testCase.m_searchUuid.AsString() );
101 const auto& graphic =
105 BOOST_CHECK_EQUAL( graphic.IsFilled(), testCase.m_expectedFilled );
110 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_AUTO_TEST_CASE(GraphicsLoad)
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers