42 const auto doBoardTest =
72 "Could not find the xy-point polygon in the test file" );
74 "Could not find the 4-arc polygon in the test file" );
84 <<
" points, " << outline.
ArcCount() <<
" arcs" );
92 <<
" points, " << outline.
ArcCount() <<
" arcs" );
94 BOOST_CHECK_LT( simplifiedCount, originalPointCount );
95 BOOST_CHECK_LE( simplifiedCount, 20 );
103 int originalPointCount = outline.
PointCount();
104 int originalArcCount = outline.
ArcCount();
107 <<
" points, " << originalArcCount <<
" arcs" );
112 int simplifiedPointCount = outline.
PointCount();
113 int simplifiedArcCount = outline.
ArcCount();
116 <<
" 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_CHECK(res.column_datatype(0)==SQL_NUMERIC||res.column_datatype(0)==SQL_DECIMAL)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_REQUIRE_MESSAGE(dc.CacheTableInfo(table, { "part_id", "val" }), dc.GetLastError())
BOOST_AUTO_TEST_SUITE_END()
BOOST_TEST_MESSAGE("Polyline has "<< chain.PointCount()<< " points")
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers