Kaydet (Commit) 1a0370b4 authored tarafından minwang's avatar minwang Kaydeden (comit) I-Jui (Ray) Sung

GPU Calc: unit test cases for EXPONDIST

Need open macro NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test

AMLOEXT-151BUG

Change-Id: Iaee4276e29ff469e5527e678fdf296a11af173a1
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst db9432fb
......@@ -197,6 +197,7 @@ public:
void testMathFormulaCscH();
void testMathFormulaExp();
void testMathFormulaLog10();
void testStatisticalFormulaExpondist();
CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula);
......@@ -325,6 +326,7 @@ public:
CPPUNIT_TEST(testMathFormulaCscH);
CPPUNIT_TEST(testMathFormulaExp);
CPPUNIT_TEST(testMathFormulaLog10);
CPPUNIT_TEST(testStatisticalFormulaExpondist);
CPPUNIT_TEST_SUITE_END();
private:
......@@ -3300,6 +3302,29 @@ void ScOpenclTest::testMathFormulaBitAnd()
xDocSh->DoClose();
xDocShRes->DoClose();
}
//[AMLOEXT-151]
void ScOpenclTest::testStatisticalFormulaExpondist()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh = loadDoc("opencl/statistical/Expondist.", XLS);
ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes = loadDoc("opencl/statistical/Expondist.", XLS);
ScDocument* pDocRes = xDocShRes->GetDocument();
CPPUNIT_ASSERT(pDocRes);
// Check the results of formula cells in the shared formula range.
for (SCROW i = 0; i <= 9; ++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-153]
void ScOpenclTest::testMathFormulaOdd()
{
......
......@@ -1429,6 +1429,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case ocBetaDist:
case ocExp:
case ocLog10:
case ocExpDist:
// 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