Back out unordered_map change for SCH_ITEM.
We're sensitive to the ordering in this one. Also fixes a problem with the unit tests when KICAD_SPICE=OFF.
This commit is contained in:
parent
e4b6da287f
commit
ced55583a6
|
@ -418,7 +418,7 @@ int ERC_TESTER::TestNoConnectPins()
|
|||
}
|
||||
}
|
||||
|
||||
for( auto& pair : pinMap )
|
||||
for( const std::pair<const VECTOR2I, std::vector<SCH_PIN*>>& pair : pinMap )
|
||||
{
|
||||
if( pair.second.size() > 1 )
|
||||
{
|
||||
|
|
|
@ -484,7 +484,7 @@ protected:
|
|||
// to store a initial pos of the item or mouse cursor
|
||||
|
||||
/// Store pointers to other items that are connected to this one, per sheet.
|
||||
std::unordered_map<SCH_SHEET_PATH, SCH_ITEM_SET, SHEET_PATH_HASH, SHEET_PATH_CMP> m_connected_items;
|
||||
std::map<SCH_SHEET_PATH, SCH_ITEM_SET, SHEET_PATH_CMP> m_connected_items;
|
||||
|
||||
/// Store connectivity information, per sheet.
|
||||
std::unordered_map<SCH_SHEET_PATH, SCH_CONNECTION*> m_connection_map;
|
||||
|
|
|
@ -85,33 +85,39 @@ public:
|
|||
{
|
||||
// Our simulator is actually Ngspice.
|
||||
NGSPICE* ngspice = dynamic_cast<NGSPICE*>( m_simulator.get() );
|
||||
ngspice->SetReporter( m_reporter.get() );
|
||||
|
||||
if( ngspice )
|
||||
ngspice->SetReporter( m_reporter.get() );
|
||||
|
||||
wxFFile file( GetNetlistPath( true ), "rt" );
|
||||
wxString netlist;
|
||||
|
||||
file.ReadAll( &netlist );
|
||||
//ngspice->Init();
|
||||
ngspice->Command( "set ngbehavior=ps" );
|
||||
ngspice->Command( "setseed 1" );
|
||||
ngspice->Command( "set filetype=ascii" );
|
||||
ngspice->Command( "set numdgt=3" );
|
||||
ngspice->Command( "set wr_singlescale" );
|
||||
ngspice->Command( "set wr_vecnames" );
|
||||
ngspice->LoadNetlist( netlist.ToStdString() );
|
||||
ngspice->Run();
|
||||
|
||||
|
||||
wxString vectors;
|
||||
for( const wxString& vector : m_testedVectors )
|
||||
vectors << vector << " ";
|
||||
if( ngspice )
|
||||
{
|
||||
//ngspice->Init();
|
||||
ngspice->Command( "set ngbehavior=ps" );
|
||||
ngspice->Command( "setseed 1" );
|
||||
ngspice->Command( "set filetype=ascii" );
|
||||
ngspice->Command( "set numdgt=3" );
|
||||
ngspice->Command( "set wr_singlescale" );
|
||||
ngspice->Command( "set wr_vecnames" );
|
||||
ngspice->LoadNetlist( netlist.ToStdString() );
|
||||
ngspice->Run();
|
||||
|
||||
// We need to make sure that the number of points always the same.
|
||||
ngspice->Command( wxString::Format( "linearize %s", vectors ).ToStdString() );
|
||||
|
||||
ngspice->Command(
|
||||
wxString::Format( "wrdata %s %s", GetResultsPath( true ), vectors ).ToStdString() );
|
||||
wxString vectors;
|
||||
for( const wxString& vector : m_testedVectors )
|
||||
vectors << vector << " ";
|
||||
|
||||
// We need to make sure that the number of points always the same.
|
||||
ngspice->Command( wxString::Format( "linearize %s", vectors ).ToStdString() );
|
||||
|
||||
ngspice->Command(
|
||||
wxString::Format( "wrdata %s %s", GetResultsPath( true ), vectors ).ToStdString() );
|
||||
}
|
||||
|
||||
FILE_LINE_READER refReader( GetResultsPath() );
|
||||
FILE_LINE_READER resultReader( GetResultsPath( true ) );
|
||||
|
|
Loading…
Reference in New Issue