summaryrefslogtreecommitdiff
path: root/sc/qa/unit/opencl-test.cxx
diff options
context:
space:
mode:
authormingli <mingli@multicorewareinc.com>2013-12-31 11:54:03 +0800
committerI-Jui (Ray) Sung <ray@multicorewareinc.com>2013-12-31 17:20:02 -0600
commit92a81d621a0a37d619067e90b0c54d97a18085a0 (patch)
tree194bb74da4956a7906a51a2875f733e3a947bfbb /sc/qa/unit/opencl-test.cxx
parentb8d852c170582cee3ec4d120da25abe5fd5bbf55 (diff)
GPU Calc: unit test cases for Not support multiple data types of KURT
AMLOEXT-387 BUG Change-Id: I491dfd98183691033a15f21f41efe514bf96de85 Signed-off-by: haochen <haochen@multicorewareinc.com> Signed-off-by: Wei Wei <weiwei@multicorewareinc.com> Signed-off-by: I-Jui (Ray) Sung <ray@multicorewareinc.com>
Diffstat (limited to 'sc/qa/unit/opencl-test.cxx')
-rw-r--r--sc/qa/unit/opencl-test.cxx25
1 files changed, 25 insertions, 0 deletions
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" )
{