Kaydet (Commit) c7d6acd3 authored tarafından hongyu zhong's avatar hongyu zhong Kaydeden (comit) I-Jui (Ray) Sung

GPU Calc: unit test cases for CHIINV

Need to enable NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test

AMLOEXT-173 BUG

Change-Id: I630f4f7c994dacc601421e96290db5e2408ca569
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst 06571f68
......@@ -211,6 +211,7 @@ public:
void testMathFormulaBitLshift();
void testMathFormulaBitRshift();
void testMathFormulaBitXor();
void testStatisticalFormulaChiInv();
CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula);
......@@ -353,6 +354,7 @@ public:
CPPUNIT_TEST(testMathFormulaBitLshift);
CPPUNIT_TEST(testMathFormulaBitRshift);
CPPUNIT_TEST(testMathFormulaBitXor);
CPPUNIT_TEST(testStatisticalFormulaChiInv);
CPPUNIT_TEST_SUITE_END();
private:
......@@ -3862,6 +3864,29 @@ void ScOpenclTest::testMathFormulaLog()
xDocSh->DoClose();
xDocShRes->DoClose();
}
//[AMLOEXT-173]
void ScOpenclTest::testStatisticalFormulaChiInv()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh = loadDoc("opencl/statistical/ChiInv.", XLS);
ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes = loadDoc("opencl/statistical/ChiInv.", XLS);
ScDocument* pDocRes = xDocShRes->GetDocument();
CPPUNIT_ASSERT(pDocRes);
// Check the results of formula cells in the shared formula range.
for (SCROW i = 1; i <= 10; ++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-176 ]
void ScOpenclTest::testMathCountIfsFormula()
......
......@@ -1443,6 +1443,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case ocBitLshift:
case ocBitRshift:
case ocBitXor:
case ocChiInv:
// Don't change the state.
break;
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