diff options
author | shiming zhang <shiming@multicorewareinc.com> | 2013-12-16 11:43:07 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-12-19 17:54:01 -0600 |
commit | be226d2082fec312f1888cc93dbf68bc98ef1f4a (patch) | |
tree | 47b969459801bcd0d4df650bdab86b4de5693a94 /sc/qa | |
parent | 07566812ebf152dfc760091ab391bc89c993c4d7 (diff) |
GPU Calc: unit test cases for STDEVA
Turn NO_FALLBACK_TO_SWINTERP on in formulagroupcl.cxx for test
AMLOEXT-220 BUG
Change-Id: Id31a9bbaf0bdb5323190168a498ddf126d2fb6e4
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/StDevA.xls | bin | 0 -> 8704 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 28 |
2 files changed, 28 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/opencl/statistical/StDevA.xls b/sc/qa/unit/data/xls/opencl/statistical/StDevA.xls Binary files differnew file mode 100644 index 000000000000..4c0721f7fd7e --- /dev/null +++ b/sc/qa/unit/data/xls/opencl/statistical/StDevA.xls diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 20f6b3bc7243..58c40e1f21be 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -275,6 +275,7 @@ public: void testStatisticalFormulaAverageA(); void testStatisticalFormulaVarA(); void testStatisticalFormulaVarPA(); + void testStatisticalFormulaStDevA(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -480,6 +481,7 @@ public: CPPUNIT_TEST(testStatisticalFormulaAverageA); CPPUNIT_TEST(testStatisticalFormulaVarA); CPPUNIT_TEST(testStatisticalFormulaVarPA); + CPPUNIT_TEST(testStatisticalFormulaStDevA); CPPUNIT_TEST_SUITE_END(); private: @@ -5078,6 +5080,32 @@ void ScOpenclTest::testStatisticalFormulaVarPA() xDocShRes->DoClose(); } +//[AMLOEXT-220] +void ScOpenclTest::testStatisticalFormulaStDevA() +{ + if (!detectOpenCLDevice()) + return; + + ScDocShellRef xDocSh = loadDoc("opencl/statistical/StDevA.", XLS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + + ScDocShellRef xDocShRes = loadDoc("opencl/statistical/StDevA.", XLS); + ScDocument* pDocRes = xDocShRes->GetDocument(); + CPPUNIT_ASSERT(pDocRes); + // Check the results of formula cells in the shared formula range. + for (SCROW i = 1; i <= 20; ++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-245] void ScOpenclTest::testMathFormulaSumProduct2() { |