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

GPU Calc: unit test cases for ASIN

Need open macro NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test

AMLOEXT-130 BUG

Change-Id: I964d15fc3b864d2c392d3b1dcb22153eb057ff5b
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst 6d5ee687
......@@ -168,6 +168,7 @@ public:
void testMathFormulaCosh();
void testStatisticalFormulaCritBinom();
void testMathFormulaArcCotHyp();
void testMathFormulaArcSin();
CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula);
......@@ -267,6 +268,7 @@ public:
CPPUNIT_TEST(testMathFormulaCosh);
CPPUNIT_TEST(testStatisticalFormulaCritBinom);
CPPUNIT_TEST(testMathFormulaArcCotHyp);
CPPUNIT_TEST(testMathFormulaArcSin);
CPPUNIT_TEST_SUITE_END();
private:
......@@ -2677,6 +2679,31 @@ void ScOpenclTest::testMathFormulaArcCotHyp()
}
xDocSh->DoClose();
xDocShRes->DoClose();
}
//[AMLOEXT-130]
void ScOpenclTest::testMathFormulaArcSin()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh =
loadDoc("opencl/math/ArcSin.", ODS);
ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes =
loadDoc("opencl/math/ArcSin.", 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]
void ScOpenclTest:: testFinancialVDBFormula()
......
......@@ -1402,6 +1402,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case ocCosHyp:
case ocKritBinom:
case ocArcCotHyp:
case ocArcSin:
// 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