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

GPU Calc: unit test cases for ASINH

Need open macro NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test

AMLOEXT-143 BUG

Change-Id: Ib5b0d65d0dc88e5ea45679f9aba3ce4f55944daf
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst 8a8c128a
...@@ -169,6 +169,7 @@ public: ...@@ -169,6 +169,7 @@ public:
void testStatisticalFormulaCritBinom(); void testStatisticalFormulaCritBinom();
void testMathFormulaArcCotHyp(); void testMathFormulaArcCotHyp();
void testMathFormulaArcSin(); void testMathFormulaArcSin();
void testMathFormulaArcSinHyp();
CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula); CPPUNIT_TEST(testFinacialFormula);
...@@ -269,6 +270,7 @@ public: ...@@ -269,6 +270,7 @@ public:
CPPUNIT_TEST(testStatisticalFormulaCritBinom); CPPUNIT_TEST(testStatisticalFormulaCritBinom);
CPPUNIT_TEST(testMathFormulaArcCotHyp); CPPUNIT_TEST(testMathFormulaArcCotHyp);
CPPUNIT_TEST(testMathFormulaArcSin); CPPUNIT_TEST(testMathFormulaArcSin);
CPPUNIT_TEST(testMathFormulaArcSinHyp);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -2883,6 +2885,31 @@ void ScOpenclTest::testStatisticalFormulaCritBinom() ...@@ -2883,6 +2885,31 @@ void ScOpenclTest::testStatisticalFormulaCritBinom()
xDocSh->DoClose(); xDocSh->DoClose();
xDocShRes->DoClose(); xDocShRes->DoClose();
} }
//[AMLOEXT-143]
void ScOpenclTest::testMathFormulaArcSinHyp()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh =
loadDoc("opencl/math/ArcSinHyp.", ODS);
ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes =
loadDoc("opencl/math/ArcSinHyp.", ODS);
ScDocument* pDocRes = xDocShRes->GetDocument();
CPPUNIT_ASSERT(pDocRes);
// Verify ASinH 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();
}
ScOpenclTest::ScOpenclTest() ScOpenclTest::ScOpenclTest()
: ScBootstrapFixture( "/sc/qa/unit/data" ) : ScBootstrapFixture( "/sc/qa/unit/data" )
{ {
......
...@@ -1403,6 +1403,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) ...@@ -1403,6 +1403,7 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case ocKritBinom: case ocKritBinom:
case ocArcCotHyp: case ocArcCotHyp:
case ocArcSin: case ocArcSin:
case ocArcSinHyp:
// 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