42 m_mgr.LoadProject(
"" );
66 pin->SetNumber( wxT(
"1" ) );
67 pin->SetName( aName );
69 pin->SetVisible(
false );
85 pin->SetNumber( wxT(
"1" ) );
86 pin->SetName( aPinName );
88 pin->SetVisible(
false );
138 LIB_SYMBOL* rail = MakePowerLibSymbol( wxT(
"+3V3" ),
false );
140 Place( rail,
VECTOR2I( 1000000, 0 ), wxEmptyString );
149 LIB_SYMBOL* rail = MakePowerLibSymbol( wxT(
"+3V3" ),
true );
151 Place( rail,
VECTOR2I( 1000000, 0 ), wxEmptyString );
160 LIB_SYMBOL* rail = MakePowerLibSymbol( wxT(
"+3V3" ),
false );
162 Place( rail,
VECTOR2I( 1000000, 0 ), wxT(
" " ) );
171 LIB_SYMBOL* rail = MakePowerLibSymbol( wxT(
"+3V3" ),
false );
172 LIB_SYMBOL* ground = MakePowerLibSymbol( wxT(
"GND" ),
false );
174 Place( rail,
VECTOR2I( 1000000, 0 ), wxT(
"+3V3" ) );
175 Place( ground,
VECTOR2I( 3000000, 0 ), wxT(
"GND" ) );
184 LIB_SYMBOL* part = MakeSymbolWithHiddenPowerPin( wxT(
"74LS00" ), wxT(
"VCC" ) );
186 Place( part,
VECTOR2I( 1000000, 0 ), wxEmptyString );
Runs the electrical rules checks and adds a SCH_MARKER for each violation.
int TestEmptyPowerValues()
Check for power symbols whose value resolves to nothing, leaving their net unnamed.
Define a library symbol object.
const LIB_ID & GetLibId() const override
SCH_FIELD & GetValueField()
void AddDrawItem(SCH_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
std::shared_ptr< RC_ITEM > GetRCItem() const
void SetText(const wxString &aText) override
Base class for any item which can be embedded within the SCHEMATIC container class,...
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this symbol.
@ ERCE_EMPTY_POWER_VALUE
Power symbol has no value, so it names no net.
@ PT_POWER_IN
power input (GND, VCC for ICs). Must be connected to a power output.
EMPTY_POWER_VALUE_ERC_FIXTURE()
std::vector< std::unique_ptr< LIB_SYMBOL > > m_libSymbols
LIB_SYMBOL * MakeSymbolWithHiddenPowerPin(const wxString &aName, const wxString &aPinName)
An ordinary symbol carrying a hidden power input, the legacy shape that names its net from the pin an...
std::unique_ptr< SCHEMATIC > m_schematic
SCH_SYMBOL * Place(LIB_SYMBOL *aPart, const VECTOR2I &aPos, const wxString &aValue)
LIB_SYMBOL * MakePowerLibSymbol(const wxString &aName, bool aLocal)
Build a single pin power symbol, the shape every rail symbol in the stock library has.
@ VALUE
Field Value of part, i.e. "3.3K".
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_FIXTURE_TEST_CASE(EmptyGlobalPowerValueFlagged, EMPTY_POWER_VALUE_ERC_FIXTURE)
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I