46 std::unique_ptr<SCHEMATIC> schematic;
53 ~RESTORE_POOL() { pool.reset( count ); }
54 } restore{ pool, pool.get_thread_count() };
57 std::string expectedChanged;
58 std::shared_ptr<BUS_ALIAS> alias;
60 for(
const auto& candidate : schematic->GetAllBusAliases() )
62 if( candidate && candidate->GetName() == wxS(
"MIXED_BUS" ) )
67 const auto members = alias->Members();
69 for(
size_t count : { 1, 2, 8 } )
72 facade.
Update( *schematic,
true );
73 const auto actual =
Dump( *schematic, facade );
79 facade.
Update( *schematic );
83 alias->AddMember( wxS(
"HAM" ) );
84 facade.
Update( *schematic );
85 const auto changed =
Dump( *schematic, facade );
88 if( expectedChanged.empty() )
89 expectedChanged = changed;
92 facade.
Update( *schematic,
true );
94 alias->SetMembers( members );
101 std::unique_ptr<SCHEMATIC> schematic;
103 const auto path = schematic->Hierarchy().front();
114 if(
auto* line =
dynamic_cast<SCH_LINE*
>( item ); line && line->
GetStartPoint().y == line->GetEndPoint().
y )
117 if(
auto* symbol =
dynamic_cast<SCH_SYMBOL*
>( item ) )
119 if( symbol->GetRef( &
path ) ==
"TP1" )
120 pin = symbol->GetPins( &
path ).front();
131 const auto check = [&](
bool aUnconnected )
133 schematic->ConnectionGraph()->Recalculate( schematic->Hierarchy(),
true );
137 engine.
Update( schematic->Hierarchy(), 1, {} );
140 for(
const auto& entry : engine.
Signals().Entries() )
142 const auto& signal = entry->value;
144 if( std::none_of( signal.items.begin(), signal.items.end(),
147 return item.item == pin->m_Uuid;
151 BOOST_REQUIRE_NE( signal.baseName,
INVALID_ID );
180 std::unique_ptr<SCHEMATIC> schematic;
182 const auto path = schematic->Hierarchy().front();
190 if( label && label->GetText() ==
"NET_1" )
192 else if( label && label->GetText() ==
"NET_2" )
200 schematic->ConnectionGraph()->Recalculate( schematic->Hierarchy(),
true );
202 engine.
Update( schematic->Hierarchy(), 1, {} );
218 BOOST_CHECK( row.itemType == connection->Type() );
virtual const wxString & GetText() const
Return the string associated with the text object.
Owns one key/version session and its current stage evaluations; main-thread use only.
const PUBLICATION & Published() const
const COMPONENT_CACHE< SIGNAL_RESULT > & Signals() const
const SESSION_KEYS & Keys() const
void Update(const SCH_SHEET_LIST &aPaths, uint64_t aTextEpoch, const BUS_ALIASES &aAliases, bool aRebuild=false)
Refresh inputs, bundle slots and signal summaries with the source text epoch and effective aliases.
Model-owned source resolver.
void Update(SCHEMATIC &aSchematic, bool aRebuild=false)
const PUBLICATION & Published() const
const ROWS & Rows() const
const CHANGE_SET & Changes() const
const wxString & Name(NAME_ID aId) const
Base class for any item which can be embedded within the SCHEMATIC container class,...
void SetConnectivityDirty(bool aDirty=true)
Set the dirty flag.
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
void SetPosition(const VECTOR2I &aPosition) override
Segment description base class to describe items which have 2 end points (track, wire,...
VECTOR2I GetStartPoint() const
VECTOR2I GetPosition() const override
void SetPosition(const VECTOR2I &aPosition) override
void SetExcludedFromBoard(bool aEnable, const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) override
VECTOR2I GetPosition() const override
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
Value keys and the key session of the schematic connectivity engine.
std::string Dump(SCHEMATIC &aSchematic)
Canonical, pointer-free connectivity rows for migration and rebuild comparisons.
constexpr uint32_t INVALID_ID
Marks an unset handle.
One item or pin in one sheet instance.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(NativePublicationIsStableAcrossWorkerCounts)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
VECTOR3I expected(15, 30, 45)
BOOST_CHECK_EQUAL(result, "25.4")
thread_pool & GetKiCadThreadPool()
Get a reference to the current thread pool.
BS::priority_thread_pool thread_pool
VECTOR2< int32_t > VECTOR2I