24#include <boost/test/unit_test.hpp>
27#include <wx/filename.h>
61 bool loaded =
image.LoadGerberFile( wxString::FromUTF8( fn ) );
70 if( items.size() != 6 )
85 int posIdx =
copy * 2;
86 int negIdx =
copy * 2 + 1;
88 BOOST_CHECK_MESSAGE( !items[posIdx]->GetLayerPolarity(),
89 "Item " << posIdx <<
" (copy " <<
copy <<
" positive) "
90 <<
"should have positive polarity" );
92 BOOST_CHECK_MESSAGE( items[negIdx]->GetLayerPolarity(),
93 "Item " << negIdx <<
" (copy " <<
copy <<
" negative) "
94 <<
"should have negative polarity" );
103 VECTOR2I origPos = items[0]->GetPosition();
105 int expectedDx =
copy * stepX;
122 FILE* file = wxFopen(
path, wxT(
"wt" ) );
125 fputs(
"%MOMM*%\n%FSLAX26Y26*%\n%ADD10C,1.00000*%\nD10*\nX0Y0D03*\nM02*\n", file );
136 wxRemoveFile(
path );
Hold the image data and parameters for one gerber file and layer parameters.
wxString CreateChildFileStr(const wxString &aName) const
Create and return the path to a direct child file as a wxString.
std::vector< GERBER_DRAW_ITEM * > GERBER_DRAW_ITEMS
std::string GetTestDataRootDir()
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
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_REQUIRE(res.columns()==1)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(BlockReplication)
Verifies that an SR block replicates all items as a unit rather than replicating each item individual...
static std::string GetGerbviewTestDataDir()
VECTOR2< int32_t > VECTOR2I