diff options
author | mingli ju <mingli@multicorewareinc.com> | 2013-11-05 15:27:00 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-11-13 00:45:03 -0600 |
commit | b29d4dd63e27ed125216247776e8bb849ac3edb3 (patch) | |
tree | 3152e7cfd4c5b44894980a6862e4201b9dbf81da | |
parent | GPU Calc: implemented for KURT (diff) | |
download | core-b29d4dd63e27ed125216247776e8bb849ac3edb3.tar.gz core-b29d4dd63e27ed125216247776e8bb849ac3edb3.zip |
GPU Calc: unit test cases for KURT
Need open macro NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test
AMLOEXT-87 BUG
Change-Id: Id0ba1660027fa45653a99a1b1e63f730fdfb2bee
Signed-off-by: haochen <haochen@multicorewareinc.com>
Signed-off-by: I-Jui (Ray) Sung <ray@multicorewareinc.com>
-rw-r--r-- | sc/qa/unit/data/xls/opencl/statistical/Kurt.xls | bin | 0 -> 7680 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 25 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 1 |
3 files changed, 26 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/opencl/statistical/Kurt.xls b/sc/qa/unit/data/xls/opencl/statistical/Kurt.xls Binary files differnew file mode 100644 index 000000000000..f4ed4dba02cd --- /dev/null +++ b/sc/qa/unit/data/xls/opencl/statistical/Kurt.xls diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 78bf08b35016..51f56287e97f 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -139,6 +139,7 @@ public: void testFinancialMDurationFormula(); void testMathSumIfsFormula(); void testFinancialVDBFormula(); + void testStatisticalFormulaKurt(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -209,6 +210,7 @@ public: CPPUNIT_TEST(testFinancialMDurationFormula); CPPUNIT_TEST(testMathSumIfsFormula); CPPUNIT_TEST(testFinancialVDBFormula); + CPPUNIT_TEST(testStatisticalFormulaKurt); CPPUNIT_TEST_SUITE_END(); private: @@ -1477,6 +1479,29 @@ void ScOpenclTest::testStatisticalFormulaRsq() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-87] +void ScOpenclTest::testStatisticalFormulaKurt() +{ + if (!detectOpenCLDevice()) + return; + ScDocShellRef xDocSh = loadDoc("opencl/statistical/Kurt.", XLS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + ScDocShellRef xDocShRes = loadDoc("opencl/statistical/Kurt.", 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(1,i,0)); + double fExcel = pDocRes->GetValue(ScAddress(1,i,0)); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel)); + } + xDocSh->DoClose(); + xDocShRes->DoClose(); +} //[AMLOEXT-90] void ScOpenclTest::testMathFormulaCsc() { diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 02dd30a68d9c..5988e98f7148 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -1380,6 +1380,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) case ocGDA: case ocZW: case ocVBD: + case ocKurt: // Don't change the state. break; default: |