83 std::vector<struct TEST_DATA> testData = {
87 {
".tran 0 1 0.1 UIC",
ST_TRAN },
88 {
".ac dec 10 1 10K",
ST_AC },
89 {
".ac dec 10 1K 100MEG",
ST_AC },
90 {
".ac lin 100 1 100HZ",
ST_AC },
91 {
".dc VIN 0.25 5.0 0.25",
ST_DC },
92 {
".dc VDS 0 10 .5 VGS 0 5 1",
ST_DC },
93 {
".dc VCE 0 10 .25 IB 0 10u 1u",
ST_DC },
94 {
".dc RLoad 1k 2k 100",
ST_DC },
95 {
".dc TEMP -15 75 5",
ST_DC },
96 {
".disto dec 10 1kHz 100MEG",
ST_DISTO },
97 {
".disto dec 10 1kHz 100MEG 0.9",
ST_DISTO },
98 {
".noise v(5) VIN dec 10 1kHz 100MEG",
ST_NOISE },
99 {
".noise v(5,3) V1 oct 8 1.0 1.0e6 1",
ST_NOISE },
100 {
".pz 1 0 3 0 cur pol",
ST_PZ },
101 {
".pz 2 3 5 0 vol zer",
ST_PZ },
102 {
".pz 4 1 4 1 cur pz",
ST_PZ },
104 {
".SENS V(OUT) AC DEC 10 100 100k",
ST_SENS },
106 {
".tf v(5, 3) VIN",
ST_TF },
107 {
".tf i(VLOAD) VIN",
ST_TF },
110 for(
auto& step : testData )
114 BOOST_CHECK_EQUAL( result, step.type );
117 for(
auto& step : testData )
119 step.command.Append(
"\n" );
122 BOOST_CHECK_EQUAL( result, step.type );
139 std::vector<struct TEST_DATA> testData = {
170 {
"net-_q3-pad2_",
"V(net-_q3-pad2_)",
SPT_VOLTAGE },
171 {
"net-_q2-pad3_",
"V(net-_q2-pad3_)",
SPT_VOLTAGE },
172 {
"net-_q2-pad1_",
"V(net-_q2-pad1_)",
SPT_VOLTAGE },
173 {
"net-_q1-pad3_",
"V(net-_q1-pad3_)",
SPT_VOLTAGE },
174 {
"net-_l2-pad1_",
"V(net-_l2-pad1_)",
SPT_VOLTAGE },
175 {
"net-_c4-pad2_",
"V(net-_c4-pad2_)",
SPT_VOLTAGE },
176 {
"net-_c3-pad1_",
"V(net-_c3-pad1_)",
SPT_VOLTAGE },
177 {
"net-_c1-pad2_",
"V(net-_c1-pad2_)",
SPT_VOLTAGE },
190 for(
auto& step : testData )
192 wxString outputSignalName;
195 retVal = m_exporter.VectorToSignal( step.vector, outputSignalName );
197 BOOST_CHECK_EQUAL( retVal, step.type );
198 BOOST_CHECK_EQUAL( outputSignalName.Cmp( step.signal ), 0 );
Holds all the data relating to one schematic.
void Reset()
Initialize this schematic to a blank one, unloading anything existing.
void SetProject(PROJECT *aPrj)
bool LoadProject(const wxString &aFullPath, bool aSetActive=true)
Loads a project or sets up a new project with a specified path.
PROJECT & Prj() const
A helper while we are not MDI-capable – return the one and only project.
Special netlist exporter flavor that allows one to override simulation commands.
static SIM_TYPE CommandToSimType(const wxString &aCmd)
Return simulation type basing on a simulation command directive.
SPICE_CIRCUIT_MODEL m_exporter
SETTINGS_MANAGER m_manager
virtual ~TEST_NGSPICE_HELPERS()
SIM_TYPE
< Possible simulation types
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(CommandToSimType)
Declare the test suite.