20#include <boost/test/unit_test.hpp>
47 const wxString& aSymbolName,
50 const wxString& aInProgressKey )
59 const wxString& aSymbolName,
88 table.name =
"SelfRefDB";
89 table.table =
"Parts";
90 table.key_col =
"Part ID";
91 table.symbols_col =
"Symbols";
94 row[
table.symbols_col] = std::string(
"SelfRefDB:R-001" );
98 std::unique_ptr<LIB_SYMBOL> symbol =
102 BOOST_CHECK( symbol->GetName() == wxS(
"R-001" ) );
122 table.name =
"SelfRefDB";
123 table.table =
"Parts";
124 table.key_col =
"Part ID";
125 table.symbols_col =
"Symbols";
130 row[
table.symbols_col] = std::string(
"SomeLib:R-001" );
135 std::unique_ptr<LIB_SYMBOL> symbol = fixture.
Invoke( plugin, wxS(
"R-001" ),
table, row );
141 symbol = fixture.
Invoke( plugin, wxS(
"R-001" ),
table, row );
std::map< std::string, std::any > ROW
Regression test for https://gitlab.com/kicad/code/kicad/-/issues/24249.
std::unique_ptr< LIB_SYMBOL > InvokeWithCycle(SCH_IO_DATABASE &aPlugin, const wxString &aSymbolName, const DATABASE_LIB_TABLE &aTable, const DATABASE_CONNECTION::ROW &aRow, const wxString &aInProgressKey)
Drive loadSymbolFromRow with aInProgressKey already marked in-progress, simulating the second entry o...
std::size_t InProgressSize(const SCH_IO_DATABASE &aPlugin) const
bool IsInProgressEmpty(const SCH_IO_DATABASE &aPlugin) const
SCH_IO_DATABASE_CYCLE_DETECTION_FIXTURE()=default
std::unique_ptr< LIB_SYMBOL > Invoke(SCH_IO_DATABASE &aPlugin, const wxString &aSymbolName, const DATABASE_LIB_TABLE &aTable, const DATABASE_CONNECTION::ROW &aRow)
Drive loadSymbolFromRow without pre-seeding the in-progress set; the plugin inserts and (via its RAII...
A KiCad database library provides both symbol and footprint metadata, so there are "shim" plugins on ...
std::unordered_set< wxString > m_inProgressLoads
LIB_IDs whose resolution is in flight, used to break self-referential cycles where a row's Symbols co...
void SetLibraryManagerAdapter(SYMBOL_LIBRARY_ADAPTER *aAdapter) override
Some library plugins need to interface with other loaded libraries.
std::unique_ptr< LIB_SYMBOL > loadSymbolFromRow(const wxString &aSymbolName, const DATABASE_LIB_TABLE &aTable, const DATABASE_CONNECTION::ROW &aRow)
An interface to the global shared library manager that is schematic-specific and linked to one projec...
A database library table will be mapped to a sub-library provided by the database library entry in th...
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
std::vector< std::vector< std::string > > table
BOOST_AUTO_TEST_CASE(DetectsAlreadyInProgressLibId)
BOOST_CHECK_EQUAL(result, "25.4")