Skip to content
Snippets Groups Projects
Commit b7634c93 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[Tests] compareCurve : add more details in the error message

parent aec381c3
No related branches found
No related tags found
No related merge requests found
...@@ -83,12 +83,11 @@ void CompareCurves(curve1 c1, curve2 c2, const std::string& errMsg, bool& error ...@@ -83,12 +83,11 @@ void CompareCurves(curve1 c1, curve2 c2, const std::string& errMsg, bool& error
error = true; error = true;
} else { } else {
// derivative in T_min and T_max // derivative in T_min and T_max
ComparePoints(c1.derivate(T_min, 1), c2.derivate(T_min, 1), errMsg, error,prec, false); ComparePoints(c1.derivate(T_min, 1), c2.derivate(T_min, 1), errMsg+" Derivates at tMin do not match.", error,prec, false);
ComparePoints(c1.derivate(T_max, 1), c2.derivate(T_max, 1), errMsg, error,prec, false); ComparePoints(c1.derivate(T_max, 1), c2.derivate(T_max, 1), errMsg+" Derivates at tMax do not match.", error,prec, false);
// Test values on curves // Test values on curves
for (double i = T_min; i < T_max; i += 0.02) { for (double i = T_min; i <= T_max; i += 0.01) {
ComparePoints(c1(i), c2(i), errMsg, error,prec, false); ComparePoints(c1(i), c2(i), errMsg+" Curves evaluation do not match at t = "+boost::lexical_cast<std::string>(i), error,prec, false);
ComparePoints(c1(i), c2(i), errMsg, error,prec, false);
} }
} }
} }
......
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