diff options
author | haochen <haochen@multicorewareinc.com> | 2013-10-24 17:09:30 +0800 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-10-29 17:00:21 -0400 |
commit | 2b338845f4c1b63afe7bda155c02ce6812b693b2 (patch) | |
tree | a14a79da09aa958dede502e9f0475937cd1858b2 /sc | |
parent | 7de8a3f6877690c41a52c21e58d7c31528f5455d (diff) |
Testcases for COUPDAYSNC in GPU Calc
Change-Id: I1f4ebd5f71bc843a6d37ece7f8cc6b9c92a33a02
Signed-off-by: Wei Wei <weiwei@multicorewareinc.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/xls/OpenclCase/financial/Coupdaysnc.xls | bin | 0 -> 20480 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 22 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/OpenclCase/financial/Coupdaysnc.xls b/sc/qa/unit/data/xls/OpenclCase/financial/Coupdaysnc.xls Binary files differnew file mode 100644 index 000000000000..98aa3df9e1d2 --- /dev/null +++ b/sc/qa/unit/data/xls/OpenclCase/financial/Coupdaysnc.xls diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 6eb6c020775b..f1facaaa95af 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -80,6 +80,7 @@ public: void testFinacialSYDFormula(); void testStatisticalFormulaCorrel(); void testFinancialCoupdaysFormula(); + void testFinancialCoupdaysncFormula(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testSharedFormulaXLSGroundWater); @@ -107,6 +108,7 @@ public: CPPUNIT_TEST(testFinacialSYDFormula); CPPUNIT_TEST(testStatisticalFormulaCorrel); CPPUNIT_TEST(testFinancialCoupdaysFormula); + CPPUNIT_TEST(testFinancialCoupdaysncFormula); CPPUNIT_TEST_SUITE_END(); private: @@ -857,6 +859,26 @@ void ScOpenclTest::testFinancialCoupdaysFormula() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-72] +void ScOpenclTest::testFinancialCoupdaysncFormula() +{ + ScDocShellRef xDocSh = loadDoc("OpenclCase/financial/Coupdaysnc.", XLS); + enableOpenCL(xDocSh); + ScDocument *pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + xDocSh->DoHardRecalc(true); + ScDocShellRef xDocShRes = loadDoc("OpenclCase/financial/Coupdaysnc.", XLS); + ScDocument *pDocRes = xDocShRes->GetDocument(); + CPPUNIT_ASSERT(pDocRes); + for (SCROW i = 1; i <=10; ++i) + { + double fLibre = pDoc->GetValue(ScAddress(4, i, 0)); + double fExcel = pDocRes->GetValue(ScAddress(4, i, 0)); + CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel)); + } + xDocSh->DoClose(); + xDocShRes->DoClose(); +} void ScOpenclTest::testFinacialRateFormula() { ScDocShellRef xDocSh = loadDoc("OpenclCase/financial/RATE.", XLS); |