20#include <boost/test/unit_test.hpp>
51 wxString legacyLibPath = wxString( dataDir +
"issue22371/lib.sch/74xx.lib" );
57 auto it = symbols.find(
"74LS00" );
58 BOOST_REQUIRE_MESSAGE( it != symbols.end(),
"74LS00 not found in legacy library" );
60 std::unique_ptr<LIB_SYMBOL> flattenedLibSymbol = it->second->Flatten();
71 if( !libSymbolInSchematic )
77 int flags =
~SCH_ITEM::COMPARE_FLAGS::UUID;
79 flags &=
~SCH_ITEM::COMPARE_FLAGS::IDENTITY;
81 int result = flattenedLibSymbol->Compare( *libSymbolInSchematic, flags );
89 result = flattenedLibSymbol->Compare( *libSymbolInSchematic, defaultFlags );
96 BOOST_FAIL(
"No 74LS00 symbol found in schematic" );
const UTF8 & GetLibItemName() const
Define a library symbol object.
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
These are loaded from Eeschema settings but then overwritten by the project settings.
A cache assistant for KiCad legacy symbol libraries.
const LIB_SYMBOL_MAP & GetSymbolMap() const
Base class for any item which can be embedded within the SCHEMATIC container class,...
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
const LIB_ID & GetLibId() const override
std::unique_ptr< LIB_SYMBOL > & GetLibSymbolRef()
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
std::vector< FAB_LAYER_COLOR > dummy
SETTINGS_MANAGER m_settingsManager
std::unique_ptr< SCHEMATIC > m_schematic
ERC_LIB_SYMBOL_MISMATCH_FIXTURE()
std::map< wxString, LIB_SYMBOL *, LibSymbolMapSort > LIB_SYMBOL_MAP
BOOST_FIXTURE_TEST_CASE(ServerStartsAndResponds, API_SERVER_E2E_FIXTURE)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END()
wxString result
Test unit parsing edge cases and error handling.
BOOST_CHECK_EQUAL(result, "25.4")