diff options
author | hongyu zhong <hongyu@multicorewareinc.com> | 2013-11-10 11:00:18 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-11-14 20:30:51 -0600 |
commit | 31dbc51ebd1ef6651a9ce71e2214ac6d954af69b (patch) | |
tree | 3e1a5df484b8522fed23302afd5bcef65a1177ec /sc/qa | |
parent | 40d760db64c8def4766a0da1102c55ef6ab67cf8 (diff) |
GPU Calc: unit test cases for POISSON
Need to turn on NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test
AMLOEXT-150 BUG
Change-Id: I29324659b31d98905ead88d0d0cf44361ad1df16
Signed-off-by: haochen <haochen@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/Poisson.xls | bin | 0 -> 7680 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/Poisson.xls b/sc/qa/unit/data/xls/opencl/statistical/Poisson.xls Binary files differnew file mode 100644 index 000000000000..135c5fe7af18 --- /dev/null +++ b/sc/qa/unit/data/xls/opencl/statistical/Poisson.xls diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 73047644de06..c0acc7445e7f 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -212,6 +212,7 @@ public: void testMathFormulaBitRshift(); void testMathFormulaBitXor(); void testStatisticalFormulaChiInv(); + void testStatisticalFormulaPoisson(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -355,6 +356,7 @@ public: CPPUNIT_TEST(testMathFormulaBitRshift); CPPUNIT_TEST(testMathFormulaBitXor); CPPUNIT_TEST(testStatisticalFormulaChiInv); + CPPUNIT_TEST(testStatisticalFormulaPoisson); CPPUNIT_TEST_SUITE_END(); private: @@ -3404,6 +3406,29 @@ void ScOpenclTest::testMathFormulaBitAnd() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-150] +void ScOpenclTest::testStatisticalFormulaPoisson() +{ + if (!detectOpenCLDevice()) + return; + ScDocShellRef xDocSh = loadDoc("opencl/statistical/Poisson.", XLS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + ScDocShellRef xDocShRes = loadDoc("opencl/statistical/Poisson.", 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(3,i,0)); + double fExcel = pDocRes->GetValue(ScAddress(3,i,0)); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel)); + } + xDocSh->DoClose(); + xDocShRes->DoClose(); +} //[AMLOEXT-151] void ScOpenclTest::testStatisticalFormulaExpondist() { |