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

GPU Calc: unit test cases for ARCCOT

Need open macro NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test

AMLOEXT-127 BUG

Change-Id: I2e44589b34da9a2491986b4f8ab075da7b01145a
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst fa87dc52
......@@ -164,6 +164,7 @@ public:
void testFinancialCouppcdFormula();
void testFinancialCoupncdFormula();
void testStatisticalFormulaLogInv();
void testMathFormulaArcCot();
CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula);
......@@ -259,6 +260,7 @@ public:
CPPUNIT_TEST(testFinancialCoupncdFormula);
CPPUNIT_TEST(testFinancialAccrintFormula);
CPPUNIT_TEST(testStatisticalFormulaLogInv);
CPPUNIT_TEST(testMathFormulaArcCot);
CPPUNIT_TEST_SUITE_END();
private:
......@@ -2491,6 +2493,31 @@ void ScOpenclTest:: testFinancialMDurationFormula()
xDocSh->DoClose();
xDocShRes->DoClose();
}
//[AMLOEXT-127]
void ScOpenclTest::testMathFormulaArcCot()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh =
loadDoc("opencl/math/ArcCot.", ODS);
ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes =
loadDoc("opencl/math/ArcCot.", ODS);
ScDocument* pDocRes = xDocShRes->GetDocument();
CPPUNIT_ASSERT(pDocRes);
// Verify ACot 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-131]
void ScOpenclTest:: testFinancialFVFormula()
{
......
......@@ -1398,6 +1398,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case ocIntercept:
case ocGDA2:
case ocLogInv:
case ocArcCot:
// 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