diff options
author | shiming zhang <shiming@multicorewareinc.com> | 2013-12-16 11:38:22 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-12-31 17:36:44 -0600 |
commit | 937f694f548394b241b33c33d6181363660e1421 (patch) | |
tree | e342a6e9b31152f8c2a9c49164f14eadbf78215a /sc/qa/unit/opencl-test.cxx | |
parent | 977ea65ad41c0ebd89d7266c3c8dbb1c6620ea31 (diff) |
GPU Calc: unit test cases for VARPA
Turn NO_FALLBACK_TO_SWINTERP on in formulagroupcl.cxx for test
AMLOEXT-219 BUG
Change-Id: Ic14af13c87a10e108a3416463fb1e49dd47abfb0
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>
Signed-off-by: Wei Wei <weiwei@multicorewareinc.com>
Diffstat (limited to 'sc/qa/unit/opencl-test.cxx')
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index eac7a6012e3a..20f6b3bc7243 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -273,6 +273,8 @@ public: void testStatisticalFormulaCountA(); void testStatisticalFormulaMaxa(); void testStatisticalFormulaAverageA(); + void testStatisticalFormulaVarA(); + void testStatisticalFormulaVarPA(); CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testFinacialFormula); @@ -476,6 +478,8 @@ public: CPPUNIT_TEST(testStatisticalFormulaMaxa); CPPUNIT_TEST(testStatisticalFormulaCountA); CPPUNIT_TEST(testStatisticalFormulaAverageA); + CPPUNIT_TEST(testStatisticalFormulaVarA); + CPPUNIT_TEST(testStatisticalFormulaVarPA); CPPUNIT_TEST_SUITE_END(); private: @@ -5048,6 +5052,32 @@ void ScOpenclTest::testStatisticalFormulaVarA() xDocShRes->DoClose(); } +//[AMLOEXT-219] +void ScOpenclTest::testStatisticalFormulaVarPA() +{ + if (!detectOpenCLDevice()) + return; + + ScDocShellRef xDocSh = loadDoc("opencl/statistical/VarPA.", XLS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + + ScDocShellRef xDocShRes = loadDoc("opencl/statistical/VarPA.", XLS); + ScDocument* pDocRes = xDocShRes->GetDocument(); + CPPUNIT_ASSERT(pDocRes); + // Check the results of formula cells in the shared formula range. + for (SCROW i = 1; i <= 20; ++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-245] void ScOpenclTest::testMathFormulaSumProduct2() { |