diff options
-rw-r--r-- | sc/qa/unit/data/ods/opencl/math/Quotient.ods | bin | 0 -> 13710 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 27 |
2 files changed, 27 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/opencl/math/Quotient.ods b/sc/qa/unit/data/ods/opencl/math/Quotient.ods Binary files differnew file mode 100644 index 000000000000..28242f0ea91c --- /dev/null +++ b/sc/qa/unit/data/ods/opencl/math/Quotient.ods diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 53db504d3fa8..ec7ce134b547 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -280,6 +280,7 @@ public: void testMathFormulaSEC(); void testMathFormulaSECH(); void testMathFormulaMROUND(); + void testMathFormulaQuotient(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -490,6 +491,7 @@ public: CPPUNIT_TEST(testMathFormulaSEC); CPPUNIT_TEST(testMathFormulaSECH); CPPUNIT_TEST(testMathFormulaMROUND); + CPPUNIT_TEST(testMathFormulaQuotient); CPPUNIT_TEST_SUITE_END(); private: @@ -5786,6 +5788,31 @@ void ScOpenclTest::testMathFormulaMROUND() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-372] +void ScOpenclTest::testMathFormulaQuotient() +{ + if (!detectOpenCLDevice()) + return; + ScDocShellRef xDocSh = + loadDoc("opencl/math/Quotient.", ODS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + ScDocShellRef xDocShRes = + loadDoc("opencl/math/Quotient.", ODS); + ScDocument* pDocRes = xDocShRes->GetDocument(); + CPPUNIT_ASSERT(pDocRes); + // Verify BitAnd Function + for (SCROW i = 1; i <= 20; ++i) + { + 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)); + } + xDocSh->DoClose(); + xDocShRes->DoClose(); +} ScOpenclTest::ScOpenclTest() : ScBootstrapFixture( "/sc/qa/unit/data" ) { |