summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/qa/unit/data/xls/opencl/statistical/Kurt1.xlsbin0 -> 8704 bytes
-rw-r--r--sc/qa/unit/opencl-test.cxx25
2 files changed, 25 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/opencl/statistical/Kurt1.xls b/sc/qa/unit/data/xls/opencl/statistical/Kurt1.xls
new file mode 100644
index 000000000000..24f489fcb31e
--- /dev/null
+++ b/sc/qa/unit/data/xls/opencl/statistical/Kurt1.xls
Binary files differ
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index cf3e01412087..2635988d5a6a 100644
--- a/sc/qa/unit/opencl-test.cxx
+++ b/sc/qa/unit/opencl-test.cxx
@@ -287,6 +287,7 @@ public:
void testNegSub();
void testStatisticalFormulaAvedev();
void testMathFormulaAverageIf_Mix();
+ void testStatisticalFormulaKurt1();
CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula);
@@ -505,6 +506,7 @@ public:
CPPUNIT_TEST(testNegSub);
CPPUNIT_TEST(testStatisticalFormulaAvedev);
CPPUNIT_TEST(testMathFormulaAverageIf_Mix);
+ CPPUNIT_TEST(testStatisticalFormulaKurt1);
CPPUNIT_TEST_SUITE_END();
private:
@@ -5969,6 +5971,29 @@ void ScOpenclTest::testMathFormulaAverageIf_Mix()
xDocSh->DoClose();
xDocShRes->DoClose();
}
+//[AMLOEXT-387]
+void ScOpenclTest::testStatisticalFormulaKurt1()
+{
+ if (!detectOpenCLDevice())
+ return;
+ ScDocShellRef xDocSh = loadDoc("opencl/statistical/Kurt1.", XLS);
+ ScDocument* pDoc = xDocSh->GetDocument();
+ CPPUNIT_ASSERT(pDoc);
+ enableOpenCL();
+ pDoc->CalcAll();
+ ScDocShellRef xDocShRes = loadDoc("opencl/statistical/Kurt1.", XLS);
+ ScDocument* pDocRes = xDocShRes->GetDocument();
+ CPPUNIT_ASSERT(pDocRes);
+ // Check the results of formula cells in the shared formula range.
+ for (SCROW i = 1; i <= 19; ++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" )
{