From 232e4d34f1681a2538370bcaf5d1ff9773cfb2b0 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 22 Jan 2023 14:34:59 +0000 Subject: [PATCH] Use default error limits. They're already relative to the value. --- qa/unittests/eeschema/sim/test_sim_regressions.cpp | 12 ++++++------ qa/unittests/eeschema/test_netlist_exporter_spice.h | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/qa/unittests/eeschema/sim/test_sim_regressions.cpp b/qa/unittests/eeschema/sim/test_sim_regressions.cpp index 685ed5e80a..91829f2760 100644 --- a/qa/unittests/eeschema/sim/test_sim_regressions.cpp +++ b/qa/unittests/eeschema/sim/test_sim_regressions.cpp @@ -101,8 +101,8 @@ BOOST_FIXTURE_TEST_CASE( ImmediateSBCKT, TEST_SIM_REGRESSIONS_FIXTURE ) m_SaveCurrents = false; TestNetlist( "issue13431" ); - TestTranPoint( 0.005, { { "V(/soft_start)", 2.489 } }, 0.001 ); - TestTranPoint( 0.012, { { "V(/soft_start)", 5.100 } }, 0.001 ); + TestTranPoint( 0.005, { { "V(/soft_start)", 2.489 } } ); + TestTranPoint( 0.012, { { "V(/soft_start)", 5.100 } } ); } @@ -111,8 +111,8 @@ BOOST_FIXTURE_TEST_CASE( LegacyFixups, TEST_SIM_REGRESSIONS_FIXTURE ) LOCALE_IO dummy; TestNetlist( "issue13112" ); - TestTranPoint( 0.01, { { "V(out)", -0.060 } }, 0.001 ); - TestTranPoint( 0.02, { { "V(out)", 0.856 } }, 0.001 ); + TestTranPoint( 0.01, { { "V(out)", -0.060 } } ); + TestTranPoint( 0.02, { { "V(out)", 0.856 } } ); } @@ -121,8 +121,8 @@ BOOST_FIXTURE_TEST_CASE( DualNMOSAmp, TEST_SIM_REGRESSIONS_FIXTURE ) LOCALE_IO dummy; TestNetlist( "issue13162" ); - TestTranPoint( 0.030, { { "V(out)", 0.535 } }, 0.001 ); - TestTranPoint( 0.035, { { "V(out)", -1.437 } }, 0.001 ); + TestTranPoint( 0.030, { { "V(out)", 0.535 } } ); + TestTranPoint( 0.035, { { "V(out)", -1.437 } } ); } diff --git a/qa/unittests/eeschema/test_netlist_exporter_spice.h b/qa/unittests/eeschema/test_netlist_exporter_spice.h index 05f61e4162..fd31bccaac 100644 --- a/qa/unittests/eeschema/test_netlist_exporter_spice.h +++ b/qa/unittests/eeschema/test_netlist_exporter_spice.h @@ -228,6 +228,7 @@ public: << ", Actual value: " << yVector[i] ) { double maxError = abs( refValue * aMaxRelError ); + if( maxError == 0 ) { // If refValue is 0, we need a obtain the max. error differently.