Kaydet (Commit) ee999b1c authored tarafından yangzhang's avatar yangzhang Kaydeden (comit) I-Jui (Ray) Sung

GPU Calc: unit test cases for ACOTH

Need open macro NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test

AMLOEXT-129 BUG

Change-Id: I6ef356cad7cdc787309dfd22efff50364e2c2d3a
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst c1e2b069
...@@ -167,6 +167,7 @@ public: ...@@ -167,6 +167,7 @@ public:
void testMathFormulaArcCot(); void testMathFormulaArcCot();
void testMathFormulaCosh(); void testMathFormulaCosh();
void testStatisticalFormulaCritBinom(); void testStatisticalFormulaCritBinom();
void testMathFormulaArcCotHyp();
CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula); CPPUNIT_TEST(testFinacialFormula);
...@@ -265,6 +266,7 @@ public: ...@@ -265,6 +266,7 @@ public:
CPPUNIT_TEST(testMathFormulaArcCot); CPPUNIT_TEST(testMathFormulaArcCot);
CPPUNIT_TEST(testMathFormulaCosh); CPPUNIT_TEST(testMathFormulaCosh);
CPPUNIT_TEST(testStatisticalFormulaCritBinom); CPPUNIT_TEST(testStatisticalFormulaCritBinom);
CPPUNIT_TEST(testMathFormulaArcCotHyp);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -2650,6 +2652,31 @@ void ScOpenclTest::testMathSumIfsFormula() ...@@ -2650,6 +2652,31 @@ void ScOpenclTest::testMathSumIfsFormula()
} }
xDocSh->DoClose(); xDocSh->DoClose();
xDocShRes->DoClose(); xDocShRes->DoClose();
}
//[AMLOEXT-129]
void ScOpenclTest::testMathFormulaArcCotHyp()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh =
loadDoc("opencl/math/ArcCotHyp.", ODS);
ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes =
loadDoc("opencl/math/ArcCotHyp.", ODS);
ScDocument* pDocRes = xDocShRes->GetDocument();
CPPUNIT_ASSERT(pDocRes);
// Verify ACotH Function
for (SCROW i = 1; i <= 1000; ++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-133] //[AMLOEXT-133]
void ScOpenclTest:: testFinancialVDBFormula() void ScOpenclTest:: testFinancialVDBFormula()
......
...@@ -1401,6 +1401,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) ...@@ -1401,6 +1401,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case ocArcCot: case ocArcCot:
case ocCosHyp: case ocCosHyp:
case ocKritBinom: case ocKritBinom:
case ocArcCotHyp:
// 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