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

GPU Calc: unit test cases for STDEVP

Turn  NO_FALLBACK_TO_SWINTERP on in  formulagroupcl.cxx for test

AMLOEXT-185 BUG

Change-Id: Icfbc7ff33f9d6fb702353250d29c5166513ff960
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst 68ef0136
......@@ -237,6 +237,7 @@ public:
void testStatisticalFormulaTDist();
void testStatisticalFormulaTInv();
void testArrayFormulaSumXMY2();
void testStatisticalFormulaStDevP();
CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula);
......@@ -405,6 +406,7 @@ public:
CPPUNIT_TEST(testStatisticalFormulaTDist);
CPPUNIT_TEST(testStatisticalFormulaTInv);
CPPUNIT_TEST(testArrayFormulaSumXMY2);
CPPUNIT_TEST(testStatisticalFormulaStDevP);
CPPUNIT_TEST_SUITE_END();
private:
......@@ -4310,6 +4312,31 @@ void ScOpenclTest::testStatisticalFormulaStDev()
xDocSh->DoClose();
xDocShRes->DoClose();
}
//[AMLOEXT-185]
void ScOpenclTest::testStatisticalFormulaStDevP()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh = loadDoc("opencl/statistical/StDevP.", XLS);
ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes = loadDoc("opencl/statistical/StDevP.", 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(1,i,0));
double fExcel = pDocRes->GetValue(ScAddress(1,i,0));
CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel));
}
xDocSh->DoClose();
xDocShRes->DoClose();
}
//[AMLOEXT-186]
void ScOpenclTest::testStatisticalFormulaSlope()
{
......
......@@ -1468,6 +1468,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case ocTDist:
case ocTInv:
case ocSumXMY2:
case ocStDevP:
// 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