Skip to content
Snippets Groups Projects
Commit 87eaccb8 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Bug in minimizer test machinery

parent e5368db6
No related branches found
No related tags found
No related merge requests found
......@@ -67,12 +67,16 @@ bool MinimizerTestPlan::valuesAsExpected(const std::vector<double>& values) cons
std::ostringstream text;
for (const auto& plan : m_parameter_plan) {
double diff = Numeric::get_relative_difference(values[index], plan.expectedValue());
bool diff_ok(true);
if (diff > plan.tolerance())
success = false;
diff_ok = false;
text << plan.fitParameter().name() << " found:" << values[index]
<< " expected:" << plan.expectedValue() << " diff:" << diff << " "
<< (success ? "OK" : "FAILED") << "\n";
<< (diff_ok ? "OK" : "FAILED") << "\n";
success &= diff_ok;
++index;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment