Kaydet (Commit) c204c1a9 authored tarafından haochen's avatar haochen Kaydeden (comit) Kohei Yoshida

Testcases for CSC in GPU Calc

Change-Id: Ie2d85b5566a3f87224707a2e28b14fba0b75ad46
Signed-off-by: 's avatarWei Wei <weiwei@multicorewareinc.com>
üst 775a535f
...@@ -84,6 +84,7 @@ public: ...@@ -84,6 +84,7 @@ public:
void testFinacialDISCFormula(); void testFinacialDISCFormula();
void testFinacialINTRATEFormula(); void testFinacialINTRATEFormula();
void testMathFormulaCos(); void testMathFormulaCos();
void testMathFormulaCsc();
void testStatisticalFormulaRsq(); void testStatisticalFormulaRsq();
void testStatisticalFormulaPearson(); void testStatisticalFormulaPearson();
void testStatisticalFormulaNegbinomdist(); void testStatisticalFormulaNegbinomdist();
...@@ -121,6 +122,7 @@ public: ...@@ -121,6 +122,7 @@ public:
CPPUNIT_TEST(testStatisticalFormulaNegbinomdist); CPPUNIT_TEST(testStatisticalFormulaNegbinomdist);
CPPUNIT_TEST(testStatisticalFormulaRsq); CPPUNIT_TEST(testStatisticalFormulaRsq);
CPPUNIT_TEST(testStatisticalFormulaPearson); CPPUNIT_TEST(testStatisticalFormulaPearson);
CPPUNIT_TEST(testMathFormulaCsc);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -409,6 +411,7 @@ void ScOpenclTest::testMathFormulaCos() ...@@ -409,6 +411,7 @@ void ScOpenclTest::testMathFormulaCos()
xDocSh->DoClose(); xDocSh->DoClose();
xDocShRes->DoClose(); xDocShRes->DoClose();
} }
void ScOpenclTest::testFinacialFormula() void ScOpenclTest::testFinacialFormula()
{ {
ScDocShellRef xDocSh = loadDoc("FinancialFormulaTest.", XLS); ScDocShellRef xDocSh = loadDoc("FinancialFormulaTest.", XLS);
...@@ -1075,6 +1078,24 @@ void ScOpenclTest::testStatisticalFormulaRsq() ...@@ -1075,6 +1078,24 @@ void ScOpenclTest::testStatisticalFormulaRsq()
xDocSh->DoClose(); xDocSh->DoClose();
xDocShRes->DoClose(); xDocShRes->DoClose();
} }
//[AMLOEXT-90]
void ScOpenclTest::testMathFormulaCsc()
{
ScDocShellRef xDocSh = loadDoc("OpenCLTests/math/csc.", ODS);
enableOpenCL(xDocSh); ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc); xDocSh->DoHardRecalc(true);
ScDocShellRef xDocShRes = loadDoc("OpenCLTests/math/csc.", 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();
}
ScOpenclTest::ScOpenclTest() ScOpenclTest::ScOpenclTest()
: ScBootstrapFixture( "/sc/qa/unit/data" ) : ScBootstrapFixture( "/sc/qa/unit/data" )
......
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