diff options
author | mingli <mingli@multicorewareinc.com> | 2013-12-16 09:23:11 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-12-19 17:53:58 -0600 |
commit | fd4b93627a329db84bb7a350769a9844f0478356 (patch) | |
tree | 80e62394aa22a2b36d7d04b8d30af3877d5132bd | |
parent | 61737565749e7d64dd09c07c480fa12a80477b5b (diff) |
GPU Calc: unit test cases for MINA
Turn NO_FALLBACK_TO_SWINTERP on in formulagroupcl.cxx for test
AMLOEXT-202 BUG
Change-Id: I4f6f864a904f840462764c479c20970e697d7b41
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>
-rw-r--r-- | sc/qa/unit/data/xls/opencl/statistical/Mina.xls | bin | 0 -> 21504 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 23 |
2 files changed, 23 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/opencl/statistical/Mina.xls b/sc/qa/unit/data/xls/opencl/statistical/Mina.xls Binary files differnew file mode 100644 index 000000000000..5701e7266488 --- /dev/null +++ b/sc/qa/unit/data/xls/opencl/statistical/Mina.xls diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index f4e2f91e97fb..b35a3a211348 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -269,6 +269,7 @@ public: void testMathFormulaIsEven(); void testMathFormulaIsOdd(); void testMathFormulaFact(); + void testStatisticalFormulaMina(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -4808,6 +4809,28 @@ void ScOpenclTest::testStatisticalFormulaBetainv() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-202] +void ScOpenclTest::testStatisticalFormulaMina() +{ + if (!detectOpenCLDevice()) + return; + ScDocShellRef xDocSh = loadDoc("opencl/statistical/Mina.", XLS); + ScDocument *pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + ScDocShellRef xDocShRes = loadDoc("opencl/statistical/Mina.", XLS); + ScDocument *pDocRes = xDocShRes->GetDocument(); + CPPUNIT_ASSERT(pDocRes); + for (SCROW i = 0; i <= 9; ++i) + { + double fLibre = pDoc->GetValue(ScAddress(6, i, 0)); + double fExcel = pDocRes->GetValue(ScAddress(6, i, 0)); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel)); + } + xDocSh->DoClose(); + xDocShRes->DoClose(); +} //[ AMLOEXT-204] void ScOpenclTest:: testArrayFormulaSumXMY2() { |