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

GPU Calc: unit test cases for STANDARDIZE

Need open macro NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test

AMLOEXT-77 BUG

Change-Id: Ie2919ca8d99e19ff2d17fe9d7fc3fbe2a49a4e05
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst 6786d9b8
...@@ -128,6 +128,7 @@ public: ...@@ -128,6 +128,7 @@ public:
void testMathFormulaSin(); void testMathFormulaSin();
void testMathFormulaTan(); void testMathFormulaTan();
void testMathFormulaTanH(); void testMathFormulaTanH();
void testStatisticalFormulaStandard();
CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula); CPPUNIT_TEST(testFinacialFormula);
...@@ -187,6 +188,7 @@ public: ...@@ -187,6 +188,7 @@ public:
CPPUNIT_TEST(testMathFormulaSin); CPPUNIT_TEST(testMathFormulaSin);
CPPUNIT_TEST(testMathFormulaTan); CPPUNIT_TEST(testMathFormulaTan);
CPPUNIT_TEST(testMathFormulaTanH); CPPUNIT_TEST(testMathFormulaTanH);
CPPUNIT_TEST(testStatisticalFormulaStandard);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -1359,6 +1361,31 @@ void ScOpenclTest::testFinacialINTRATEFormula() ...@@ -1359,6 +1361,31 @@ void ScOpenclTest::testFinacialINTRATEFormula()
xDocSh->DoClose(); xDocSh->DoClose();
xDocShRes->DoClose(); xDocShRes->DoClose();
} }
//[AMLOEXT-77]
void ScOpenclTest::testStatisticalFormulaStandard()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh = loadDoc("opencl/statistical/Standard.", XLS);
ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes = loadDoc("opencl/statistical/Standard.", 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(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-82] //[AMLOEXT-82]
void ScOpenclTest::testStatisticalFormulaPearson() void ScOpenclTest::testStatisticalFormulaPearson()
{ {
......
...@@ -1374,6 +1374,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) ...@@ -1374,6 +1374,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case ocSin: case ocSin:
case ocTan: case ocTan:
case ocTanHyp: case ocTanHyp:
case ocStandard:
// 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