diff options
Diffstat (limited to 'sc/qa/unit/opencl-test.cxx')
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 56b48460a0bb..12e3ba8e8d68 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -181,6 +181,7 @@ public: void testMathFormulaCot(); void testMathFormulaCoth(); void testFinacialNPER1Formula(); + void testStatisticalFormulaFDist(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -293,6 +294,7 @@ public: CPPUNIT_TEST(testMathFormulaCot); CPPUNIT_TEST(testMathFormulaCoth); CPPUNIT_TEST(testFinacialNPER1Formula); + CPPUNIT_TEST(testStatisticalFormulaFDist); CPPUNIT_TEST_SUITE_END(); private: @@ -2933,6 +2935,29 @@ void ScOpenclTest::testStatisticalFormulaConfidence() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-141] +void ScOpenclTest::testStatisticalFormulaFDist() +{ + if (!detectOpenCLDevice()) + return; + ScDocShellRef xDocSh = loadDoc("opencl/statistical/Fdist.", XLS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + ScDocShellRef xDocShRes = loadDoc("opencl/statistical/Fdist.", XLS); + ScDocument* pDocRes = xDocShRes->GetDocument(); + CPPUNIT_ASSERT(pDocRes); + // Check the results of formula cells in the shared formula range. + for (SCROW i = 0; i <= 9; ++i) + { + double fLibre = pDoc->GetValue(ScAddress(3,i,0)); + double fExcel = pDocRes->GetValue(ScAddress(3,i,0)); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel)); + } + xDocSh->DoClose(); + xDocShRes->DoClose(); +} //[AMLOEXT-136] void ScOpenclTest::testFinancialCoupncdFormula() { |