diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-06-10 15:57:59 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-06-10 15:58:27 +0200 |
commit | a903cac829f0c607b5895cbaae51ab4951ed8567 (patch) | |
tree | 859527ee3c0582b4acaf4b3db6ac66cf4b303a20 | |
parent | 7cfc80cb1663c1f4b4e813ab90c95fae01d1afc1 (diff) |
fix assert
Change-Id: I55627efdf50bea4c1371b6c54df67cc71d5fce2f
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 951f4b54d0e6..ee6b2e3e7051 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -3870,7 +3870,10 @@ void ScOpenclTest::testMathFormulaMod() { double fLibre = pDoc->GetValue(ScAddress(2,i,0)); double fExcel = pDocRes->GetValue(ScAddress(2,i,0)); - CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel)); + if(fExcel == 0.0f) + CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, 1e-10); + else + CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel)); } xDocSh->DoClose(); xDocShRes->DoClose(); |