diff options
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/ods/opencl/statistical/CHISQINV.ods | bin | 0 -> 17130 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 25 |
2 files changed, 25 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/opencl/statistical/CHISQINV.ods b/sc/qa/unit/data/ods/opencl/statistical/CHISQINV.ods Binary files differnew file mode 100644 index 000000000000..2071bc52be2e --- /dev/null +++ b/sc/qa/unit/data/ods/opencl/statistical/CHISQINV.ods diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 76cf866cc6a1..b1b0ad11fc95 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -187,6 +187,7 @@ public: void testMathFormulaPower(); void testMathFormulaOdd(); void testStatisticalFormulaChiSqDist(); + void testStatisticalFormulaChiSqInv(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -305,6 +306,7 @@ public: CPPUNIT_TEST(testMathFormulaPower); CPPUNIT_TEST(testMathFormulaOdd); CPPUNIT_TEST(testStatisticalFormulaChiSqDist); + CPPUNIT_TEST(testStatisticalFormulaChiSqInv); CPPUNIT_TEST_SUITE_END(); private: @@ -3210,6 +3212,29 @@ void ScOpenclTest:: testFinacialNPER1Formula() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-148] +void ScOpenclTest::testStatisticalFormulaChiSqInv() +{ + if (!detectOpenCLDevice()) + return; + ScDocShellRef xDocSh = loadDoc("opencl/statistical/CHISQINV.", ODS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + ScDocShellRef xDocShRes = loadDoc("opencl/statistical/CHISQINV.", ODS); + ScDocument* pDocRes = xDocShRes->GetDocument(); + CPPUNIT_ASSERT(pDocRes); + // Check the results of formula cells in the shared formula range. + for (SCROW i = 1; i <= 9; ++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(); +} //[AMLOEXT-149] void ScOpenclTest::testMathFormulaBitAnd() { |