21#include <boost/test/data/test_case.hpp>
33struct GRAPHICS_LOAD_TEST_CASE
38 bool m_expectedFilled;
45 std::vector<GRAPHICS_LOAD_TEST_CASE> m_generatorCases;
48const std::vector<GRAPHICS_LOAD_BOARD_TEST_CASE> GraphicsLoad_testCases{
52 "graphics_load_save_v20240108",
57 "65596b4f-7b03-48e9-8be7-5824316ea7fd",
62 "cf265305-49c9-43d8-bb2a-ad34997b22d6",
67 "d0669ae2-442f-427f-af0f-bc3008af779a",
72 "fd1649a3-9a92-4dd3-96b4-88469cb257ba",
84 const auto doBoardTest =
85 [&](
const BOARD& aBoard )
87 for(
const GRAPHICS_LOAD_TEST_CASE& testCase : testCase.m_generatorCases )
90 << testCase.m_searchUuid.
AsString() );
101 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(GraphicsLoad, boost::unit_test::data::make(GraphicsLoad_testCases), testCase)
BOOST_TEST_MESSAGE("Polyline has "<< chain.PointCount()<< " points")
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers