Kaydet (Commit) e4be59b2 authored tarafından zhenyu yuan's avatar zhenyu yuan Kaydeden (comit) I-Jui (Ray) Sung

GPU Calc: unit test cases for COT

Need turn on NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test

AMLOEXT-88 BUG

Change-Id: Ica73415215042a5c2dd55df16498420576772ba1
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst 425f1f55
...@@ -178,6 +178,7 @@ public: ...@@ -178,6 +178,7 @@ public:
void testStatisticalFormulaGammaDist(); void testStatisticalFormulaGammaDist();
void testMathFormulaLN(); void testMathFormulaLN();
void testMathFormulaRound(); void testMathFormulaRound();
void testMathFormulaCot();
CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula); CPPUNIT_TEST(testFinacialFormula);
...@@ -287,6 +288,7 @@ public: ...@@ -287,6 +288,7 @@ public:
CPPUNIT_TEST(testStatisticalFormulaGammaDist); CPPUNIT_TEST(testStatisticalFormulaGammaDist);
CPPUNIT_TEST(testMathFormulaLN); CPPUNIT_TEST(testMathFormulaLN);
CPPUNIT_TEST(testMathFormulaRound); CPPUNIT_TEST(testMathFormulaRound);
CPPUNIT_TEST(testMathFormulaCot);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -1689,6 +1691,29 @@ void ScOpenclTest::testStatisticalFormulaKurt() ...@@ -1689,6 +1691,29 @@ void ScOpenclTest::testStatisticalFormulaKurt()
xDocSh->DoClose(); xDocSh->DoClose();
xDocShRes->DoClose(); xDocShRes->DoClose();
} }
//[AMLOEXT-88]
void ScOpenclTest::testMathFormulaCot()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh = loadDoc("opencl/math/cot.", ODS);
ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes = loadDoc("opencl/math/cot.", ODS);
ScDocument* pDocRes = xDocShRes->GetDocument();
CPPUNIT_ASSERT(pDocRes);
for (SCROW i = 0; i <= 15; ++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-90] //[AMLOEXT-90]
void ScOpenclTest::testMathFormulaCsc() void ScOpenclTest::testMathFormulaCsc()
{ {
......
...@@ -1412,6 +1412,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) ...@@ -1412,6 +1412,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case ocGammaDist: case ocGammaDist:
case ocLn: case ocLn:
case ocRound: case ocRound:
case ocCot:
// 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