diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/xls/opencl/math/seriessum.xls | bin | 0 -> 7680 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 24 |
2 files changed, 24 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/opencl/math/seriessum.xls b/sc/qa/unit/data/xls/opencl/math/seriessum.xls Binary files differnew file mode 100644 index 000000000000..14104ac0e2c1 --- /dev/null +++ b/sc/qa/unit/data/xls/opencl/math/seriessum.xls diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index ec7ce134b547..9704e7f2b1bd 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -280,6 +280,7 @@ public: void testMathFormulaSEC(); void testMathFormulaSECH(); void testMathFormulaMROUND(); + void testMathFormulaSeriesSum(); void testMathFormulaQuotient(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); @@ -492,6 +493,7 @@ public: CPPUNIT_TEST(testMathFormulaSECH); CPPUNIT_TEST(testMathFormulaMROUND); CPPUNIT_TEST(testMathFormulaQuotient); + CPPUNIT_TEST(testMathFormulaSeriesSum); CPPUNIT_TEST_SUITE_END(); private: @@ -5813,6 +5815,28 @@ void ScOpenclTest::testMathFormulaQuotient() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-373] +void ScOpenclTest::testMathFormulaSeriesSum() +{ + if (!detectOpenCLDevice()) + return; + ScDocShellRef xDocSh = loadDoc("opencl/math/seriessum.", XLS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + ScDocShellRef xDocShRes = loadDoc("opencl/math/seriessum.", XLS); + 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() : ScBootstrapFixture( "/sc/qa/unit/data" ) { |