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

GPU Calc: unit test cases for ACCRINT

Need open macro NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test

AMLOEXT-138 BUG

Change-Id: If1e82dda864f06b0deea448e3bfbaf116b2c6ee4
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst 541b0791
......@@ -80,6 +80,7 @@ public:
void testFinacialMIRRFormula();
void testFinacialRateFormula();
void testFinancialAccrintmFormula();
void testFinancialAccrintFormula();
void testCompilerNested();
void testFinacialSLNFormula();
void testStatisticalFormulaGammaLn();
......@@ -255,6 +256,7 @@ public:
CPPUNIT_TEST(testFinancialDBFormula);
CPPUNIT_TEST(testFinancialCouppcdFormula);
CPPUNIT_TEST(testFinancialCoupncdFormula);
CPPUNIT_TEST(testFinancialAccrintFormula);
CPPUNIT_TEST_SUITE_END();
private:
......@@ -2700,6 +2702,28 @@ void ScOpenclTest::testFinancialCoupncdFormula()
xDocSh->DoClose();
xDocShRes->DoClose();
}
//[AMLOEXT-138]
void ScOpenclTest::testFinancialAccrintFormula()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh = loadDoc("opencl/financial/Accrint.", XLS);
ScDocument *pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes = loadDoc("opencl/financial/Accrint.", XLS);
ScDocument *pDocRes = xDocShRes->GetDocument();
CPPUNIT_ASSERT(pDocRes);
for (SCROW i = 0; i <= 9; ++i)
{
double fLibre = pDoc->GetValue(ScAddress(7, i, 0));
double fExcel = pDocRes->GetValue(ScAddress(7, i, 0));
CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel));
}
xDocSh->DoClose();
xDocShRes->DoClose();
}
ScOpenclTest::ScOpenclTest()
: 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