diff options
author | shiming zhang <shiming@multicorewareinc.com> | 2013-11-16 18:34:14 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-11-16 23:20:13 -0600 |
commit | 08c68cc138a17ee0c0031d0049a18898c926d4ba (patch) | |
tree | b21cc5f675691e21723c77154e35710273bedc5e /sc/qa | |
parent | a81e6fb33b3dca4cc50155a3d6fa7db3207e4579 (diff) |
GPU Calc: unit test cases for TDIST
Turn NO_FALLBACK_TO_SWINTERP on in formulagroupcl.cxx for test
AMLOEXT-190 BUG
Change-Id: I7d48101f41c592e8c83bd82aa87767e188ce37da
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/TDist.xls | bin | 0 -> 7680 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 27 |
2 files changed, 27 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/opencl/statistical/TDist.xls b/sc/qa/unit/data/xls/opencl/statistical/TDist.xls Binary files differnew file mode 100644 index 000000000000..bab249211c39 --- /dev/null +++ b/sc/qa/unit/data/xls/opencl/statistical/TDist.xls diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 510206b88550..483e7d3e9519 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -234,6 +234,7 @@ public: void testArrayFormulaSumX2PY2(); void testStatisticalFormulaBetainv(); void testStatisticalFormulaTTest(); + void testStatisticalFormulaTDist(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -399,6 +400,7 @@ public: CPPUNIT_TEST(testArrayFormulaSumX2PY2); CPPUNIT_TEST(testStatisticalFormulaBetainv); CPPUNIT_TEST(testStatisticalFormulaTTest); + CPPUNIT_TEST(testStatisticalFormulaTDist); CPPUNIT_TEST_SUITE_END(); private: @@ -4404,6 +4406,31 @@ void ScOpenclTest::testStatisticalFormulaTTest() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-190] +void ScOpenclTest::testStatisticalFormulaTDist() +{ + if (!detectOpenCLDevice()) + return; + + ScDocShellRef xDocSh = loadDoc("opencl/statistical/TDist.", XLS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + + ScDocShellRef xDocShRes = loadDoc("opencl/statistical/TDist.", 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(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-192] void ScOpenclTest::testStatisticalFormulaBinomDist() { |