27#include <boost/test/unit_test.hpp>
37namespace fs = std::filesystem;
44 std::ifstream stream( aFeaturesFile );
47 while( std::getline( stream, line ) )
49 if( line.rfind(
"S ", 0 ) == 0 )
68 for(
const BOARD_ITEM* item : board->Drawings() )
80 std::map<std::string, UTF8> props;
81 props[
"units"] =
"mm";
82 props[
"sigfig"] =
"6";
84 BOOST_REQUIRE_NO_THROW( odbExporter.
SaveBoard( outDir.
Path().string(), *board, &props ) );
86 const fs::path features = outDir.
Path() /
"steps" /
"pcb" /
"layers" /
"b.silkscreen" /
"features";
88 BOOST_REQUIRE_MESSAGE( fs::exists( features ),
"ODB++ export produced no back silkscreen features file" );
91 "Knockout text box produced no surface features on the back silkscreen" );
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...
virtual bool IsKnockout() const
const std::filesystem::path & Path() const
Get the path to the temporary directory as a std::filesystem::path.
void SaveBoard(const wxString &aFileName, BOARD &aBoard, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Write aBoard to a storage file in a format that this PCB_IO implementation knows about or it can be u...
std::unique_ptr< BOARD > RequireBoardFromPcbnewQAData(const std::filesystem::path &aFilename)
Require a board from the path relative to the pcbnew QA data directory.
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_CASE(OdbKnockoutTextboxExport)
static int countSurfaceRecords(const fs::path &aFeaturesFile)
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer