Kaydet (Commit) 0487d675 authored tarafından mulei's avatar mulei Kaydeden (comit) I-Jui (Ray) Sung

GPU Calc: unit test cases for ODDLPRICE

Need open macro NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test

AMLOEXT-67 BUG

Change-Id: I1f55cf6c24f6454a933c2431724340c3ef4021e2
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst 27bfa067
......@@ -156,6 +156,7 @@ public:
void testFinancialIPMTFormula();
void testStatisticalFormulaConfidence();
void testStatisticalFormulaIntercept();
void testFinacialODDLPRICEFormula();
CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula);
......@@ -243,6 +244,7 @@ public:
CPPUNIT_TEST(testFinancialIPMTFormula);
CPPUNIT_TEST(testStatisticalFormulaConfidence);
CPPUNIT_TEST(testStatisticalFormulaIntercept);
CPPUNIT_TEST(testFinacialODDLPRICEFormula);
CPPUNIT_TEST_SUITE_END();
private:
......@@ -1369,6 +1371,28 @@ void ScOpenclTest::testFinacialDollarfrFormula()
xDocSh->DoClose();
xDocShRes->DoClose();
}
//[AMLOEXT-67]
void ScOpenclTest::testFinacialODDLPRICEFormula()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh = loadDoc("opencl/financial/Oddlprice.", XLS);
ScDocument *pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes = loadDoc("opencl/financial/Oddlprice.", XLS);
ScDocument *pDocRes = xDocShRes->GetDocument();
CPPUNIT_ASSERT(pDocRes);
for (SCROW i = 1; i <= 10; ++i)
{
double fLibre = pDoc->GetValue(ScAddress(8, i, 0));
double fExcel = pDocRes->GetValue(ScAddress(8, i, 0));
CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel));
}
xDocSh->DoClose();
xDocShRes->DoClose();
}
//[AMLOEXT-71]
void ScOpenclTest::testFinacialDISCFormula()
{
......
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