26#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 )
71 for(
const BOARD_ITEM* item : board->Drawings() )
80 const fs::path outDir =
81 fs::temp_directory_path() / (
"kicad_qa_odb_knockout_25074_" +
KIID().
AsString().ToStdString() );
86 std::map<std::string, UTF8> props;
87 props[
"units"] =
"mm";
88 props[
"sigfig"] =
"6";
90 BOOST_REQUIRE_NO_THROW( odbExporter.
SaveBoard( outDir.string(), *board, &props ) );
92 const fs::path features = outDir /
"steps" /
"pcb" /
"layers" /
"b.silkscreen" /
"features";
94 BOOST_REQUIRE_MESSAGE( fs::exists( features ),
"ODB++ export produced no back silkscreen features file" );
97 "Knockout text box produced no surface features on the back silkscreen" );
99 fs::remove_all( outDir );
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
wxString AsString() const
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::string GetPcbnewTestDataDir()
Utility which returns a path to the data directory where the test board files are stored.
std::unique_ptr< BOARD > ReadBoardFromFileOrStream(const std::string &aFilename, std::istream &aFallback)
Read a board from a file, or another stream, as appropriate.
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