46 const auto doBoardTest =
75 BOOST_REQUIRE_MESSAGE( xyPolygon !=
nullptr,
76 "Could not find the xy-point polygon in the test file" );
77 BOOST_REQUIRE_MESSAGE( arcPolygon !=
nullptr,
78 "Could not find the 4-arc polygon in the test file" );
88 <<
" points, " << outline.
ArcCount() <<
" arcs" );
96 <<
" points, " << outline.
ArcCount() <<
" arcs" );
98 BOOST_CHECK_LT( simplifiedCount, originalPointCount );
99 BOOST_CHECK_LE( simplifiedCount, 20 );
107 int originalPointCount = outline.
PointCount();
108 int originalArcCount = outline.
ArcCount();
111 <<
" points, " << originalArcCount <<
" arcs" );
116 int simplifiedPointCount = outline.
PointCount();
117 int simplifiedArcCount = outline.
ArcCount();
120 <<
" points, " << simplifiedArcCount <<
" arcs" );
General utilities for PCB file IO for QA programs.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
SHAPE_POLY_SET & GetPolyShape()
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
int PointCount() const
Return the number of points (vertices) in this line chain.
Represent a set of closed polygons.
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
void SimplifyOutlines(int aMaxError=0)
Simplifies the lines in the polyset.
int OutlineCount() const
Return the number of outlines in the set.
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...
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END()
BOOST_TEST_MESSAGE("Polyline has "<< chain.PointCount()<< " points")
BOOST_CHECK_EQUAL(result, "25.4")
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers