Kaydet (Commit) 43da861f authored tarafından shiming zhang's avatar shiming zhang Kaydeden (comit) I-Jui (Ray) Sung

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: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst c3cc4e02
...@@ -235,6 +235,7 @@ public: ...@@ -235,6 +235,7 @@ public:
void testStatisticalFormulaBetainv(); void testStatisticalFormulaBetainv();
void testStatisticalFormulaTTest(); void testStatisticalFormulaTTest();
void testStatisticalFormulaTDist(); void testStatisticalFormulaTDist();
void testStatisticalFormulaTInv();
CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula); CPPUNIT_TEST(testFinacialFormula);
...@@ -401,6 +402,7 @@ public: ...@@ -401,6 +402,7 @@ public:
CPPUNIT_TEST(testStatisticalFormulaBetainv); CPPUNIT_TEST(testStatisticalFormulaBetainv);
CPPUNIT_TEST(testStatisticalFormulaTTest); CPPUNIT_TEST(testStatisticalFormulaTTest);
CPPUNIT_TEST(testStatisticalFormulaTDist); CPPUNIT_TEST(testStatisticalFormulaTDist);
CPPUNIT_TEST(testStatisticalFormulaTInv);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -4431,6 +4433,31 @@ void ScOpenclTest::testStatisticalFormulaTDist() ...@@ -4431,6 +4433,31 @@ void ScOpenclTest::testStatisticalFormulaTDist()
xDocSh->DoClose(); xDocSh->DoClose();
xDocShRes->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] //[AMLOEXT-192]
void ScOpenclTest::testStatisticalFormulaBinomDist() void ScOpenclTest::testStatisticalFormulaBinomDist()
{ {
......
...@@ -1466,6 +1466,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) ...@@ -1466,6 +1466,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case ocBetaInv: case ocBetaInv:
case ocTTest: case ocTTest:
case ocTDist: case ocTDist:
case ocTInv:
// Don't change the state. // Don't change the state.
break; break;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment