61 wxString libPath( QA_DBLIB_SETTINGS_PATH );
63 std::vector<LIB_SYMBOL*> first;
71 std::vector<LIB_SYMBOL*> second;
74 BOOST_REQUIRE_EQUAL( first.size(), second.size() );
78 std::set<LIB_SYMBOL*> firstSet( first.begin(), first.end() );
81 BOOST_CHECK( firstSet.count( symbol ) );
97 const std::string dblPath =
110 symbol = plugin.
LoadSymbol( dblPath, wxS(
"RES-001" ),
nullptr );
122 std::unique_ptr<LIB_SYMBOL> owned( symbol );
124 const wxString liveDescription = owned->GetField(
FIELD_T::DESCRIPTION )->GetShownText(
false );
135 const std::vector<SEARCH_TERM>& terms = owned->GetSearchTerms();
136 bool descriptionTermPresent = std::any_of( terms.begin(), terms.end(),
139 return aTerm.Text == liveDescription;
142 BOOST_CHECK( descriptionTermPresent );
DATABASE_CACHE_SETTINGS m_Cache
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
Define a library symbol object.
A KiCad database library provides both symbol and footprint metadata, so there are "shim" plugins on ...
void EnumerateSymbolLib(wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath.
DATABASE_LIB_SETTINGS * Settings() const
void SetLibraryManagerAdapter(SYMBOL_LIBRARY_ADAPTER *aAdapter) override
Some library plugins need to interface with other loaded libraries.
LIB_SYMBOL * LoadSymbol(const wxString &aLibraryPath, const wxString &aAliasName, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this...
An interface to the global shared library manager that is schematic-specific and linked to one projec...
Abstract pattern-matching tool and implementations.
std::string GetTestDataRootDir()
int max_age
Max age of cached rows before they expire, in seconds.
A structure for storing weighted search terms.
@ DESCRIPTION
Field Description of part, i.e. "1/4W 1% Metal Film Resistor".
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_TEST_MESSAGE("\n=== Real-World Polygon PIP Benchmark ===\n"<< formatTable(table))
BOOST_AUTO_TEST_CASE(UnchangedDataReusesCache)
SCH_IO_DATABASE::cacheLib() must not rebuild its materialized LIB_SYMBOL cache when a re-query return...
BOOST_CHECK_EQUAL(result, "25.4")