diff options
author | yangzhang <yangzhang@multicorewareinc.com> | 2013-11-07 11:52:20 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-11-13 17:44:10 -0600 |
commit | 84901d03c44da80ece47758e8af44178037d2aca (patch) | |
tree | bed6fed10e736dbe32ab3b0bdd8d77afc9d9846c /sc/qa | |
parent | 8a8c128a9ee711f701c7caa750f491324e64fe54 (diff) |
GPU Calc: unit test cases for ASINH
Need open macro NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test
AMLOEXT-143 BUG
Change-Id: Ib5b0d65d0dc88e5ea45679f9aba3ce4f55944daf
Signed-off-by: haochen <haochen@multicorewareinc.com>
Signed-off-by: I-Jui (Ray) Sung <ray@multicorewareinc.com>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/ods/opencl/math/ArcSinHyp.ods | bin | 0 -> 44743 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 27 |
2 files changed, 27 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/opencl/math/ArcSinHyp.ods b/sc/qa/unit/data/ods/opencl/math/ArcSinHyp.ods Binary files differnew file mode 100644 index 000000000000..0d0525a4b1ba --- /dev/null +++ b/sc/qa/unit/data/ods/opencl/math/ArcSinHyp.ods diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 50f41f1d84cc..8fa9117eb549 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -169,6 +169,7 @@ public: void testStatisticalFormulaCritBinom(); void testMathFormulaArcCotHyp(); void testMathFormulaArcSin(); + void testMathFormulaArcSinHyp(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -269,6 +270,7 @@ public: CPPUNIT_TEST(testStatisticalFormulaCritBinom); CPPUNIT_TEST(testMathFormulaArcCotHyp); CPPUNIT_TEST(testMathFormulaArcSin); + CPPUNIT_TEST(testMathFormulaArcSinHyp); CPPUNIT_TEST_SUITE_END(); private: @@ -2883,6 +2885,31 @@ void ScOpenclTest::testStatisticalFormulaCritBinom() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-143] +void ScOpenclTest::testMathFormulaArcSinHyp() +{ + if (!detectOpenCLDevice()) + return; + ScDocShellRef xDocSh = + loadDoc("opencl/math/ArcSinHyp.", ODS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + ScDocShellRef xDocShRes = + loadDoc("opencl/math/ArcSinHyp.", ODS); + ScDocument* pDocRes = xDocShRes->GetDocument(); + CPPUNIT_ASSERT(pDocRes); + // Verify ASinH Function + for (SCROW i = 1; i <= 1000; ++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" ) { |