40#include <wx/filename.h>
51 if( !wxFileName::FileExists( dataPath ) )
53 BOOST_TEST_MESSAGE(
"no real binary Eagle sample available at " + dataPath +
"; load test skipped" );
62 BOARD* board =
nullptr;
66 board = eaglePlugin.
LoadBoard( dataPath,
nullptr,
nullptr );
70 BOOST_FAIL(
"IO_ERROR loading binary Eagle board: " + e.
What().ToStdString() );
72 catch(
const std::exception& e )
74 BOOST_FAIL( std::string(
"Exception loading binary Eagle board: " ) + e.
what() );
92 std::unique_ptr<BOARD> board( loadBoard(
"plugins/eagle_binary/blink1_b1a.brd" ) );
97 BOOST_CHECK_GT( board->Footprints().size(), 0u );
98 BOOST_CHECK_GT( board->Tracks().size(), 0u );
99 BOOST_CHECK_GT( board->GetNetInfo().GetNetCount(), 1u );
110 std::unique_ptr<BOARD> board( loadBoard(
"plugins/eagle_binary/blink1_v1a.brd" ) );
115 BOOST_CHECK_GT( board->Footprints().size(), 0u );
116 BOOST_CHECK_GT( board->Tracks().size(), 0u );
General utilities for PCB file IO for QA programs.
Information pertinent to a Pcbnew printed circuit board.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
virtual const char * what() const override
std::exception interface, returned as UTF-8
Works with Eagle 6.x XML board files and footprints to implement the Pcbnew #PLUGIN API or a portion ...
BOARD * LoadBoard(const wxString &aFileName, BOARD *aAppendToMe, const std::map< std::string, UTF8 > *aProperties=nullptr, PROJECT *aProject=nullptr) override
Load information from some input file format that this PCB_IO implementation knows about into either ...
bool CanReadBoard(const wxString &aFileName) const override
Checks if this PCB_IO can read the specified board file.
std::string GetPcbnewTestDataDir()
Utility which returns a path to the data directory where the test board files are stored.
BOARD * loadBoard(const std::string &aRelPath)
EAGLE_BINARY_IMPORT_FIXTURE()
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_CASE(LoadBinaryV4V5)
Load a v4/v5 binary board (magic 0x10 0x00) which also carries the trailing free-text and DRC section...
BOOST_AUTO_TEST_SUITE_END()
BOOST_TEST_MESSAGE("\n=== Real-World Polygon PIP Benchmark ===\n"<< formatTable(table))