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

GPU Calc: unit test cases for COTH

Need open macro NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test

AMLOEXT-91 BUG

Change-Id: Icd18c89de26f222d0a4193a238b1b635ecc957a2
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst 76af0bf4
...@@ -179,6 +179,7 @@ public: ...@@ -179,6 +179,7 @@ public:
void testMathFormulaLN(); void testMathFormulaLN();
void testMathFormulaRound(); void testMathFormulaRound();
void testMathFormulaCot(); void testMathFormulaCot();
void testMathFormulaCoth();
CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula); CPPUNIT_TEST(testFinacialFormula);
...@@ -289,6 +290,7 @@ public: ...@@ -289,6 +290,7 @@ public:
CPPUNIT_TEST(testMathFormulaLN); CPPUNIT_TEST(testMathFormulaLN);
CPPUNIT_TEST(testMathFormulaRound); CPPUNIT_TEST(testMathFormulaRound);
CPPUNIT_TEST(testMathFormulaCot); CPPUNIT_TEST(testMathFormulaCot);
CPPUNIT_TEST(testMathFormulaCoth);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -1736,6 +1738,29 @@ void ScOpenclTest::testMathFormulaCsc() ...@@ -1736,6 +1738,29 @@ void ScOpenclTest::testMathFormulaCsc()
xDocSh->DoClose(); xDocSh->DoClose();
xDocShRes->DoClose(); xDocShRes->DoClose();
} }
//[AMLOEXT-91]
void ScOpenclTest::testMathFormulaCoth()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh = loadDoc("opencl/math/coth.", ODS);
ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes = loadDoc("opencl/math/coth.", 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-92] //[AMLOEXT-92]
void ScOpenclTest::testFinacialXNPVFormula() void ScOpenclTest::testFinacialXNPVFormula()
{ {
......
...@@ -1413,6 +1413,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) ...@@ -1413,6 +1413,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case ocLn: case ocLn:
case ocRound: case ocRound:
case ocCot: case ocCot:
case ocCotHyp:
// 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