New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CheckWorkspacesMatch should use tolerance property on NumericAxis comparison #309
CheckWorkspacesMatch should use tolerance property on NumericAxis comparison #309
Conversation
and use in CheckWorkspacesMatch Refs #11179
Jenkins, retest this please. |
Jenkins, retest this please. |
1 similar comment
Jenkins, retest this please. |
|
There is an error on Windows.
|
result = axis_name + " values mismatch"; | ||
return false; | ||
} | ||
} else if (!ax1->isSpectra() && !ax1->operator==(*ax2)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are better off using the overloaded operator== instead of this first if statement. RefAxis and NumericAxis both return true for isNumeric(), but have different implementations of operator==.
The ISISIndirectAnalysis system test passes on os x 10.9 if we remove the first if.
Not checking with the tolerance provided would pretty much defeat the point of this ticket, I cant see why removing the first if would make any difference as it would be doing the same comparison as it always has. |
retest this please |
Yes, using the provided tolerance would be better. Running ISISIndirectAnalysisTest on master, CheckWorkspacesMatch is false because of the equality comparison between NumericAxis. In this branch, it fails because of the equality comparison between RefAxis. |
The win7 build has the following error. I'm going to try retesting.
|
retest this please |
Jenkins, Retest this please |
Jenkins, retest this please. |
retest this please |
@@ -65,6 +65,8 @@ class MANTID_API_DLL NumericAxis : public Axis { | |||
virtual void setValue(const std::size_t &index, const double &value); | |||
size_t indexOfValue(const double value) const; | |||
virtual bool operator==(const Axis &) const; | |||
virtual bool equalWithinTolerance(const Axis &axis2, | |||
const double tolerance = 0.0) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May we settle on a single default tolerance or remove the default value? 1e-15 is being used for operator==.
retest this please |
I tested this last week and found it fixed the issues comparing those two workspaces listed above. The new changes made today look good and it's passing all tests on jenkins. Let's |
…_use_tolerance_on_numericaxis CheckWorkspacesMatch should use tolerance property on NumericAxis comparison
Fixes #11179.
To test:
All being well this should fix the failing system test on OSX 10.9.