diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-04 21:42:51 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-04 21:42:51 +0100 |
commit | 177183f692f42f6a0cf5ee66f1b7e1c31a616140 (patch) | |
tree | a53ffc782063b39e5f4d6c77944c70a172fb228f /qadevOOo/tests | |
parent | 5a29db7a9945c4cd095799451a6c563d5aeeed57 (diff) |
Proper fix for coverity#1326893
FindBugs' FE.FE_FLOATING_POINT_EQUALITY is about double value inaccuracies, not
about NaN or negative zero (which is the topic of java.lang.Double.equals vs.
==).
Reuse existing qa.TestCaseOldAPI.approxEqual method, moved to util.utils.
Change-Id: I65f7bb1faf921e1c4035bb96aeff1eaf2cfb3153
Diffstat (limited to 'qadevOOo/tests')
-rw-r--r-- | qadevOOo/tests/java/ifc/table/_XCell.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qadevOOo/tests/java/ifc/table/_XCell.java b/qadevOOo/tests/java/ifc/table/_XCell.java index 353e8d6b3dca..e81776c974db 100644 --- a/qadevOOo/tests/java/ifc/table/_XCell.java +++ b/qadevOOo/tests/java/ifc/table/_XCell.java @@ -19,6 +19,7 @@ package ifc.table; import lib.MultiMethodTest; +import util.utils; import com.sun.star.table.CellContentType; import com.sun.star.table.XCell; @@ -149,7 +150,7 @@ public class _XCell extends MultiMethodTest { oObj.setValue(inValue) ; double cellValue = oObj.getValue() ; - boolean result = Double.valueOf(cellValue).equals(inValue); + boolean result = utils.approxEqual(cellValue, inValue); tRes.tested("setValue()", result); } // end setValue() } |