20#include <boost/test/unit_test.hpp>
36struct PADS_SCH_IMPORT_FIXTURE
38 PADS_SCH_IMPORT_FIXTURE() : m_schematic( nullptr )
40 m_settingsManager.LoadProject(
"" );
41 m_schematic.SetProject( &m_settingsManager.Prj() );
45 ~PADS_SCH_IMPORT_FIXTURE()
50 SETTINGS_MANAGER m_settingsManager;
57BOOST_FIXTURE_TEST_SUITE( PadsSchImport, PADS_SCH_IMPORT_FIXTURE )
64 wxString padsFile = wxString::FromUTF8(
75 wxString kicadFile = wxString::FromUTF8(
85 BOOST_CHECK_NE( pi.get(),
nullptr );
93 wxString padsFile = wxString::FromUTF8(
103 std::vector<SCH_SYMBOL*> u1Symbols;
111 if( sym->
GetRef( &rootPath ) == wxT(
"U1" ) )
112 u1Symbols.push_back( sym );
115 BOOST_REQUIRE_EQUAL( u1Symbols.size(), 2u );
118 std::sort( u1Symbols.begin(), u1Symbols.end(),
121 return a->GetUnit() < b->GetUnit();
133 BOOST_CHECK( u1Symbols[0]->IsMultiUnit() );
EE_TYPE OfType(KICAD_T aType) const
A SCH_IO derivation for loading PADS Logic schematic files.
bool CanReadSchematicFile(const wxString &aFileName) const override
Checks if this SCH_IO can read the specified schematic file.
SCH_SHEET * LoadSchematicFile(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Load information from some input file format that this SCH_IO implementation knows about,...
Base class for any item which can be embedded within the SCHEMATIC container class,...
EE_RTREE & Items()
Get the full RTree, usually for iterating.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void push_back(SCH_SHEET *aSheet)
Forwarded method from std::vector.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
SCH_SCREEN * GetScreen() const
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const override
std::unique_ptr< T > IO_RELEASER
Helper to hold and release an IO_BASE object when exceptions are thrown.
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(CanReadSchematicFile)
BOOST_CHECK_EQUAL(result, "25.4")