diff options
-rw-r--r-- | sc/qa/unit/data/ods/opencl/math/log10.ods | bin | 0 -> 11916 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 24 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 1 |
3 files changed, 25 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/opencl/math/log10.ods b/sc/qa/unit/data/ods/opencl/math/log10.ods Binary files differnew file mode 100644 index 000000000000..12058daa9247 --- /dev/null +++ b/sc/qa/unit/data/ods/opencl/math/log10.ods diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index af6c512270f6..d287fd14383f 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -196,6 +196,7 @@ public: void testStatisticalFormulaBetaDist(); void testMathFormulaCscH(); void testMathFormulaExp(); + void testMathFormulaLog10(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -323,6 +324,7 @@ public: CPPUNIT_TEST(testStatisticalFormulaBetaDist); CPPUNIT_TEST(testMathFormulaCscH); CPPUNIT_TEST(testMathFormulaExp); + CPPUNIT_TEST(testMathFormulaLog10); CPPUNIT_TEST_SUITE_END(); private: @@ -3593,6 +3595,28 @@ void ScOpenclTest::testMathFormulaFloor() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-180] +void ScOpenclTest::testMathFormulaLog10() +{ + if (!detectOpenCLDevice()) + return; + ScDocShellRef xDocSh = loadDoc("opencl/math/log10.", ODS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + ScDocShellRef xDocShRes = loadDoc("opencl/math/log10.", ODS); + ScDocument* pDocRes = xDocShRes->GetDocument(); + CPPUNIT_ASSERT(pDocRes); + for (SCROW i = 0; i <= 15; ++i) + { + double fLibre = pDoc->GetValue(ScAddress(1,i,0)); + double fExcel = pDocRes->GetValue(ScAddress(1,i,0)); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel)); + } + xDocSh->DoClose(); + xDocShRes->DoClose(); +} ScOpenclTest::ScOpenclTest() : ScBootstrapFixture( "/sc/qa/unit/data" ) { diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 7762eb8d9664..fa4b85612e25 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -1428,6 +1428,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) case ocB: case ocBetaDist: case ocExp: + case ocLog10: // Don't change the state. break; default: |