diff options
author | hongyu zhong <hongyu@multicorewareinc.com> | 2013-11-16 17:00:14 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-11-16 21:49:19 -0600 |
commit | 95b610968c8cc3d44609f5d766276138b7048843 (patch) | |
tree | 9e7692f96c87434e0e67be0a08ae1a0bfaad577c /sc/qa | |
parent | 886c5551396d07e8372c9b90562487d1dc69e9b9 (diff) |
GPU Calc: unit test cases for BETAINV
Turn NO_FALLBACK_TO_SWINTERP on in formulagroupcl.cxx for test
resolve compile warning in opbase.cxx
AMLOEXT-201 BUG
Change-Id: I82917b13c43c1bcaa01928b89210c8eb7495a167
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/Betainv.xls | bin | 0 -> 8704 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/Betainv.xls b/sc/qa/unit/data/xls/opencl/statistical/Betainv.xls Binary files differnew file mode 100644 index 000000000000..d06dfcaa209b --- /dev/null +++ b/sc/qa/unit/data/xls/opencl/statistical/Betainv.xls diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 81fa8ebd381e..e69a0714d22d 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -232,6 +232,7 @@ public: void testStatisticalFormulaHypGeomDist(); void testArrayFormulaSumX2MY2(); void testArrayFormulaSumX2PY2(); + void testStatisticalFormulaBetainv(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -395,6 +396,7 @@ public: CPPUNIT_TEST(testStatisticalFormulaHypGeomDist); CPPUNIT_TEST(testArrayFormulaSumX2MY2); CPPUNIT_TEST(testArrayFormulaSumX2PY2); + CPPUNIT_TEST(testStatisticalFormulaBetainv); CPPUNIT_TEST_SUITE_END(); private: @@ -4522,6 +4524,29 @@ void ScOpenclTest:: testArrayFormulaSumX2PY2() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-201] +void ScOpenclTest::testStatisticalFormulaBetainv() +{ + if (!detectOpenCLDevice()) + return; + ScDocShellRef xDocSh = loadDoc("opencl/statistical/Betainv.", XLS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + ScDocShellRef xDocShRes = loadDoc("opencl/statistical/Betainv.", 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(5,i,0)); + double fExcel = pDocRes->GetValue(ScAddress(5,i,0)); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel)); + } + xDocSh->DoClose(); + xDocShRes->DoClose(); +} ScOpenclTest::ScOpenclTest() : ScBootstrapFixture( "/sc/qa/unit/data" ) { |