diff options
author | shiming zhang <shiming@multicorewareinc.com> | 2013-12-16 11:27:16 +0800 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-12-19 17:54:00 -0600 |
commit | 49235d00f6f19bd622eba3be6f11878ac870ceca (patch) | |
tree | 7b5d62b155972d829264a9fbb5260defd5f8741d /sc/qa | |
parent | c0d1d81767fcb92d04cb8eadafcd768e2ece96f3 (diff) |
GPU Calc: unit test cases for VARA
Turn NO_FALLBACK_TO_SWINTERP on in formulagroupcl.cxx for test
AMLOEXT-218 BUG
Change-Id: I5f779e7746b0d6f47000d79b855a188d71698b2f
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/statistical/VarA.xls | bin | 0 -> 7680 bytes | |||
-rw-r--r-- | sc/qa/unit/opencl-test.cxx | 26 |
2 files changed, 26 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/opencl/statistical/VarA.xls b/sc/qa/unit/data/xls/opencl/statistical/VarA.xls Binary files differnew file mode 100644 index 000000000000..f83654762aff --- /dev/null +++ b/sc/qa/unit/data/xls/opencl/statistical/VarA.xls diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index be4a47c11f42..eac7a6012e3a 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -5022,6 +5022,32 @@ void ScOpenclTest:: testLogicalFormulaAnd() xDocShRes->DoClose(); } +//[AMLOEXT-218] +void ScOpenclTest::testStatisticalFormulaVarA() +{ + if (!detectOpenCLDevice()) + return; + + ScDocShellRef xDocSh = loadDoc("opencl/statistical/VarA.", XLS); + ScDocument* pDoc = xDocSh->GetDocument(); + CPPUNIT_ASSERT(pDoc); + enableOpenCL(); + pDoc->CalcAll(); + + ScDocShellRef xDocShRes = loadDoc("opencl/statistical/VarA.", 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() { |