57 BOOST_TEST_CHECKPOINT(
"Loading schematic " << fn.GetFullPath() );
65 m_manager.LoadProject( pro.GetFullPath() );
79 BOOST_REQUIRE_EQUAL(
m_pi->GetError().IsEmpty(),
true );
84 for(
SCH_SCREEN* screen = screens.GetFirst(); screen; screen = screens.GetNext() )
85 screen->UpdateLocalLibSymbolLinks();
90 if(
m_schematic->RootScreen()->GetFileFormatVersionAtLoad() < 20221002 )
93 if(
m_schematic->RootScreen()->GetFileFormatVersionAtLoad() < 20221110 )
96 if(
m_schematic->RootScreen()->GetFileFormatVersionAtLoad() < 20221206 )
98 for(
SCH_SCREEN* screen = screens.GetFirst(); screen; screen = screens.GetNext() )
99 screen->MigrateSimModels();
102 if( m_schematic->RootScreen()->GetFileFormatVersionAtLoad() < 20230221 )
103 screens.FixLegacyPowerSymbolMismatches();
109 sheet.UpdateAllScreenReferences();
114 std::unordered_set<SCH_SCREEN*> all_screens;
117 all_screens.insert(
path.LastScreen() );
121 m_schematic->ConnectionGraph()->Recalculate( sheets,
true );
128 fn.AppendDir(
"netlists" );
129 fn.AppendDir( aBaseName );
130 fn.SetName( aBaseName );
137template <
typename Exporter>
140 wxFileName netFile =
m_schematic->Project().GetProjectFullName();
143 netFile.SetName( netFile.GetName() +
"_test" );
147 return netFile.GetFullPath();
151template <
typename Exporter>
155 BOOST_TEST_CHECKPOINT(
"Writing netlist " << netlistPath );
158 if( wxFileExists( netlistPath ) )
159 wxRemoveFile( netlistPath );
162 std::unique_ptr<Exporter> exporter = std::make_unique<Exporter>(
m_schematic.get() );
164 bool success = exporter->WriteNetlist( netlistPath,
GetNetlistOptions(), reporter );
170template <
typename Exporter>
178template <
typename Exporter>
~SCHEMATIC_TEST_FIXTURE()
SETTINGS_MANAGER m_manager
std::unique_ptr< SCHEMATIC > m_schematic
virtual void LoadSchematic(const wxFileName &aFn)
IO_RELEASER< SCH_IO > m_pi
virtual wxFileName SchematicQAPath(const wxString &aBaseName)
A factory which returns an instance of a SCH_IO.
static std::vector< std::pair< SCH_RULE_AREA *, SCH_SCREEN * > > UpdateRuleAreasInScreens(std::unordered_set< SCH_SCREEN * > &screens, KIGFX::SCH_VIEW *view)
Update all rule area connectvity / caches in the given sheet paths.
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
void UpdateSheetInstanceData(const std::vector< SCH_SHEET_INSTANCE > &aSheetInstances)
Update all of the sheet instance information using aSheetInstances.
void AnnotatePowerSymbols()
Silently annotate the not yet annotated power symbols of the entire hierarchy of the sheet path list.
void UpdateSymbolInstanceData(const std::vector< SCH_SYMBOL_INSTANCE > &aSymbolInstances)
Update all of the symbol instance information using aSymbolInstances.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void TestNetlist(const wxString &aBaseName)
virtual void CompareNetlists()=0
virtual unsigned GetNetlistOptions()
virtual wxString GetNetlistPath(bool aTest=false)
A wrapper for reporting to a wxString object.
const wxString & GetMessages() const
static const std::string NetlistFileExtension
static const std::string ProjectFileExtension
static const std::string KiCadSchematicFileExtension
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
Definition of file extensions used in Kicad.