diff options
author | mingli <mingli@multicorewareinc.com> | 2013-12-31 11:54:03 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-12-31 17:20:02 -0600 |
commit | 92a81d621a0a37d619067e90b0c54d97a18085a0 (patch) | |
tree | 194bb74da4956a7906a51a2875f733e3a947bfbb /sc/qa | |
parent | b8d852c170582cee3ec4d120da25abe5fd5bbf55 (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')
-rw-r--r-- | sc/qa/unit/data/xls/opencl/statistical/Kurt1.xls | bin | 0 -> 8704 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/xls/opencl/statistical/Kurt1.xls b/sc/qa/unit/data/xls/opencl/statistical/Kurt1.xls Binary files differnew file mode 100644 index 000000000000..24f489fcb31e --- /dev/null +++ b/sc/qa/unit/data/xls/opencl/statistical/Kurt1.xls 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" ) { |