diff options
author | shiming zhang <shiming@multicorewareinc.com> | 2013-11-16 19:01:43 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-11-16 23:20:15 -0600 |
commit | 43da861fe2feb9fc4976e67e7d29b971ddeb93ff (patch) | |
tree | 4c1ec3fe20b1011dfe458a68e5616a7d1c40e844 /sc/qa/unit | |
parent | c3cc4e02c7a3a62010de8f11376193da68404635 (diff) |
GPU Calc: unit test cases for TINV
Turn NO_FALLBACK_TO_SWINTERP on in formulagroupcl.cxx for test
AMLOEXT-191 BUG
Change-Id: Id77552084e755f100b61c7db7daaea7d79747a87
Signed-off-by: haochen <haochen@multicorewareinc.com>
Signed-off-by: I-Jui (Ray) Sung <ray@multicorewareinc.com>
Diffstat (limited to 'sc/qa/unit')
-rw-r--r-- | sc/qa/unit/data/xls/opencl/statistical/TInv.xls | bin | 0 -> 7168 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/TInv.xls b/sc/qa/unit/data/xls/opencl/statistical/TInv.xls Binary files differnew file mode 100644 index 000000000000..7aa466997170 --- /dev/null +++ b/sc/qa/unit/data/xls/opencl/statistical/TInv.xls diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 483e7d3e9519..228f6b6893c3 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -235,6 +235,7 @@ public: void testStatisticalFormulaBetainv(); void testStatisticalFormulaTTest(); void testStatisticalFormulaTDist(); + void testStatisticalFormulaTInv(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -401,6 +402,7 @@ public: CPPUNIT_TEST(testStatisticalFormulaBetainv); CPPUNIT_TEST(testStatisticalFormulaTTest); CPPUNIT_TEST(testStatisticalFormulaTDist); + CPPUNIT_TEST(testStatisticalFormulaTInv); CPPUNIT_TEST_SUITE_END(); private: @@ -4431,6 +4433,31 @@ void ScOpenclTest::testStatisticalFormulaTDist() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-191] +void ScOpenclTest::testStatisticalFormulaTInv() +{ + if (!detectOpenCLDevice()) + return; + + ScDocShellRef xDocSh = loadDoc("opencl/statistical/TInv.", XLS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + + ScDocShellRef xDocShRes = loadDoc("opencl/statistical/TInv.", 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(2,i,0)); + double fExcel = pDocRes->GetValue(ScAddress(2,i,0)); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel)); + } + xDocSh->DoClose(); + xDocShRes->DoClose(); +} //[AMLOEXT-192] void ScOpenclTest::testStatisticalFormulaBinomDist() { |