diff options
author | dechuang <dechuang@multicorewareinc.com> | 2013-11-04 14:23:11 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-11-04 00:58:55 -0600 |
commit | cd4d44e5e8b540816ed7757e243f01256418b43e (patch) | |
tree | 5d810dc59406d02e21c0c371b72901a50ef97648 /sc/qa/unit | |
parent | 0e6a2601b39cbadaff7f7506ba9e804f108060db (diff) |
GPU Calc: unit test cases for SINH
Need open macro NO_FALLBACK_TO_SWINTERP in formulagroupcl.cxx for test
AMLOEXT-116 BUG
Change-Id: Ic3cf18c9b475bc37bdca40cb64c582742bba8a5a
Signed-off-by: haochen <haochen@multicorewareinc.com>
Signed-off-by: I-Jui (Ray) Sung <ray@multicorewareinc.com>
Diffstat (limited to 'sc/qa/unit')
-rw-r--r-- | sc/qa/unit/data/xls/opencl/math/sinh.xls | bin | 0 -> 19968 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 20 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/opencl/math/sinh.xls b/sc/qa/unit/data/xls/opencl/math/sinh.xls Binary files differnew file mode 100644 index 000000000000..1a960b2a60fe --- /dev/null +++ b/sc/qa/unit/data/xls/opencl/math/sinh.xls diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 3d608947cefc..88232aa97085 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -122,6 +122,7 @@ public: void testFinacialPriceFormula(); void testFinancialDurationFormula(); void testFinancialCoupnumFormula(); + void testMathFormulaSinh(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -175,6 +176,7 @@ public: CPPUNIT_TEST(testFinacialPriceFormula); CPPUNIT_TEST(testFinancialDurationFormula); CPPUNIT_TEST(testFinancialCoupnumFormula); + CPPUNIT_TEST(testMathFormulaSinh); CPPUNIT_TEST_SUITE_END(); private: @@ -471,6 +473,24 @@ void ScOpenclTest::testMathFormulaCos() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[AMLOEXT-116] +void ScOpenclTest::testMathFormulaSinh() +{ + ScDocShellRef xDocSh = loadDoc("opencl/math/sinh.", XLS); + enableOpenCL(); ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); xDocSh->DoHardRecalc(true); + ScDocShellRef xDocShRes = loadDoc("opencl/math/sinh.", 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(); +} void ScOpenclTest::testFinacialFormula() { |