diff options
author | yiming ju <yiming@multicorewareinc.com> | 2013-12-13 14:32:32 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-12-19 17:53:56 -0600 |
commit | ccd96abb8c46c85d99cd1a9034374ea9a8a23049 (patch) | |
tree | 8a6c3ecad84e37557db29cf72ab3855a11b3edf6 /sc/qa | |
parent | b071869ba36065f173e8aa73458a77d39b06c5bd (diff) |
GPU Calc: unit test cases for ISEVEN
Turn NO_FALLBACK_TO_SWINTERP on in formulagroupcl.cxx for test
AMLOEXT-357 BUG
Change-Id: I58aa4c98207a3f9cafd0a2cec97f3abcca73ed33
Signed-off-by: haochen <haochen@multicorewareinc.com>
Signed-off-by: Wei Wei <weiwei@multicorewareinc.com>
Signed-off-by: I-Jui (Ray) Sung <ray@multicorewareinc.com>
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/data/xls/opencl/math/iseven.xls | bin | 0 -> 6656 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 25 |
2 files changed, 25 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/opencl/math/iseven.xls b/sc/qa/unit/data/xls/opencl/math/iseven.xls Binary files differnew file mode 100644 index 000000000000..3e842fbc91a6 --- /dev/null +++ b/sc/qa/unit/data/xls/opencl/math/iseven.xls diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 1bfb6d27c354..570255aeb7dc 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -266,6 +266,7 @@ public: void testMathFormulaInt(); void testMathFormulaRadians(); void testMathFormulaCountIf(); + void testMathFormulaIsEven(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -463,6 +464,7 @@ public: CPPUNIT_TEST(testMathFormulaInt); CPPUNIT_TEST(testMathFormulaRadians); CPPUNIT_TEST(testMathFormulaCountIf); + CPPUNIT_TEST(testMathFormulaIsEven); CPPUNIT_TEST_SUITE_END(); private: @@ -5411,6 +5413,29 @@ void ScOpenclTest::testMathFormulaDegrees() xDocSh->DoClose(); xDocShRes->DoClose(); } +//[ AMLOEXT-357] +void ScOpenclTest::testMathFormulaIsEven() +{ + if (!detectOpenCLDevice()) + return; + ScDocShellRef xDocSh = loadDoc("opencl/math/iseven.", XLS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + ScDocShellRef xDocShRes = loadDoc("opencl/math/iseven.", XLS); + ScDocument* pDocRes = xDocShRes->GetDocument(); + CPPUNIT_ASSERT(pDocRes); + // Check the results of formula cells in the shared formula range. + for (SCROW i = 1; i <= 9; ++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(); +} //[AMLOEXT-360] void ScOpenclTest::testMathFormulaCountIf() { |