35#include <wx/filename.h>
48 libPath.AppendDir(
"variants" );
49 libPath.SetFullName(
"pic_programmer.kicad_sym" );
54 LIB_SYMBOL* cached = pi->LoadSymbol( libPath.GetFullPath(), wxS(
"74LS125" ) );
56 return cached ? std::make_unique<LIB_SYMBOL>( *cached ) :
nullptr;
118 const size_t pinsBefore = symbol->GetPins().size();
121 BOOST_REQUIRE_GT( expectedRemovals, 0 );
125 SCH_PIN originalPin( *edited );
133 pinsBefore -
static_cast<size_t>( expectedRemovals ) );
136 int survivorsAtPos = 0;
140 BOOST_CHECK(
pin->GetParentSymbol() == symbol.get() );
142 if(
pin->GetPosition() == pinPos )
164 const size_t pinsBefore = symbol->GetPins().size();
167 BOOST_REQUIRE_GT( expectedMatches, 0 );
169 SCH_PIN originalPin( *edited );
171 edited->
SetName( wxS(
"SYNCED" ) );
184 if(
pin == edited ||
pin->GetPosition() != pinPos )
constexpr EDA_IU_SCALE schIUScale
Define a library symbol object.
std::vector< SCH_PIN * > GetPins() const override
virtual void SetUnit(int aUnit)
void SetName(const wxString &aName)
const wxString & GetName() const
PIN_ORIENTATION GetOrientation() const
VECTOR2I GetPosition() const override
int GetNameTextSize() const
ELECTRICAL_PINTYPE GetType() const
void SetNameTextSize(int aSize)
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.
@ PT_INPUT
usual pin input: must be connected
@ PIN_RIGHT
The pin extends rightwards from the connection point.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
static std::unique_ptr< LIB_SYMBOL > loadQuadBuffer()
Load 74LS125, a quad tri-state buffer whose four interchangeable units carry identically placed pins ...
static SCH_PIN * firstGateInput(LIB_SYMBOL &aSymbol)
The input pin of the first gate, i.e.
BOOST_AUTO_TEST_CASE(CommonToAllUnitsRemovesSubsumedPins)
Making a pin common to all units deletes the pins it subsumes in the other units.
static int countMatchingPins(LIB_SYMBOL &aSymbol, const SCH_PIN &aPin)
Pins of the other units that the edit is expected to subsume: same position, orientation,...
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I