38 BOOST_CHECK( m_plugin.CanReadSchematicFile( GetTestDataDir() +
"pcad_feature_test.sch" ) );
41 BOOST_CHECK( !m_plugin.CanReadSchematicFile( GetTestDataDir() +
"pcad_library_test.lia" ) );
44 BOOST_CHECK( !m_plugin.CanReadSchematicFile( GetTestDataDir() +
"pcad_board_reject.pcb" ) );
47 BOOST_CHECK( !m_plugin.CanReadSchematicFile( GetTestDataDir() +
"pcad_vintage_reject.sch" ) );
75 if( entry->GetPosition().x ==
schIUScale.MilsToIU( 6300 ) )
92 BOOST_CHECK( HasLabel( wxT(
"DATA0" ) ) );
93 BOOST_CHECK( HasLabel( wxT(
"SENSE_NET" ) ) );
94 BOOST_CHECK( HasLabel( wxT(
"DBUS" ) ) );
115 SCH_SYMBOL* unit1 = SymbolForRefdesUnit( wxT(
"U1" ), 1 );
116 SCH_SYMBOL* unit2 = SymbolForRefdesUnit( wxT(
"U1" ), 2 );
120 LIB_SYMBOL* libSym = LibSymbolForRefdes( wxT(
"U1" ) );
126 SCH_PIN* pin2 = LibPin( libSym, wxT(
"2" ) );
128 SCH_PIN* pin4 = LibPin( libSym, wxT(
"4" ) );
154 SCH_SYMBOL* u2 = SymbolForRefdesUnit( wxT(
"U2" ), 1 );
166 LIB_SYMBOL* gnd = LibSymbolForRefdes( wxT(
"#PWR" ) );
170 gnd = LibSymbolForRefdes( wxT(
"GND1" ) );
178 BOOST_CHECK( !
pin->IsVisible() );
186 const TITLE_BLOCK& tb = m_loadedRoot->GetScreen()->GetTitleBlock();
200 SCH_TEXT* bold = FindText( wxT(
"Bold TTF note" ) );
203 BOOST_CHECK( bold->
IsBold() );
207 SCH_TEXT* stroke = FindText( wxT(
"Stroke note" ) );
210 BOOST_CHECK( !stroke->
IsBold() );
213 BOOST_CHECK( FindText( wxT(
"P-CAD import feature fixture" ) ) );
233 BOOST_CHECK( found );
241 m_plugin.EnumerateSymbolLib( names, GetTestDataDir() +
"pcad_library_test.lia" );
243 BOOST_REQUIRE_EQUAL( names.size(), 1 );
247 LIB_SYMBOL* sym = m_plugin.LoadSymbol( GetTestDataDir() +
"pcad_library_test.lia",
253 BOOST_CHECK_EQUAL( sym, m_plugin.LoadSymbol( GetTestDataDir() +
"pcad_library_test.lia",
261 SCH_PIN* pin2 = LibPin( sym, wxT(
"2" ) );
constexpr EDA_IU_SCALE schIUScale
virtual VECTOR2I GetPosition() const
virtual EDA_ANGLE GetTextAngle() const
const UTF8 & GetLibItemName() const
Define a library symbol object.
wxString GetDescription() const override
bool IsPower() const override
SCH_FIELD & GetFootprintField()
Return reference to the footprint field.
std::vector< SCH_PIN * > GetPins() const override
int GetUnitCount() const override
SCH_FIELD & GetReferenceField()
Return reference to the reference designator field.
Class for a wire to bus entry.
virtual const wxString & GetText() const override
Return the string associated with the text object.
Base class for any item which can be embedded within the SCHEMATIC container class,...
VECTOR2I GetPosition() const override
GRAPHIC_PINSHAPE GetShape() const
ELECTRICAL_PINTYPE GetType() const
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
const LIB_ID & GetLibId() const override
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this symbol.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
const wxString & GetCompany() const
const wxString & GetRevision() const
const wxString & GetDate() const
const wxString & GetTitle() const
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
@ PT_INPUT
usual pin input: must be connected
@ PT_TRISTATE
tri state bus pin
@ PT_POWER_IN
power input (GND, VCC for ICs). Must be connected to a power output.
@ PT_PASSIVE
pin for passive symbols: must be connected, and can be connected to any pin.
static void LoadSchematic(SCHEMATIC *aSchematic, SCH_SHEET *aRootSheet, const wxString &aFileName)
@ VALUE
Field Value of part, i.e. "3.3K".
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(CanReadSchematic)
Shared fixture and helpers for the P-CAD schematic import test suite.
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I