Kaydet (Commit) 77639fa8 authored tarafından I-Jui (Ray) Sung's avatar I-Jui (Ray) Sung Kaydeden (comit) Kohei Yoshida

Testcases for nested operators inside SUMPRODUCT

Change-Id: Ied20d5f3f1098d663444db337875d9e2728d4cdd
üst 1ac9a525
......@@ -65,6 +65,8 @@ public:
void testFinacialIRRFormula();
void testFinacialMIRRFormula();
void testFinacialRateFormula();
void testCompilerNested();
CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testSharedFormulaXLSGroundWater);
......@@ -77,6 +79,7 @@ public:
CPPUNIT_TEST(testFinacialIRRFormula);
CPPUNIT_TEST(testFinacialMIRRFormula);
CPPUNIT_TEST(testFinacialRateFormula);
CPPUNIT_TEST(testCompilerNested);
CPPUNIT_TEST_SUITE_END();
private:
......@@ -115,6 +118,30 @@ void ScOpenclTest::enableOpenCL(ScDocShell* pShell)
pShell->SetFormulaOptions(rOpt);
}
void ScOpenclTest::testCompilerNested()
{
ScDocShellRef xDocSh = loadDoc("OpenCLTests/Compiler/nested.", ODS);
enableOpenCL(xDocSh);
ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
xDocSh->DoHardRecalc(true);
ScDocShellRef xDocShRes = loadDoc("OpenCLTests/Compiler/nested.", ODS);
ScDocument* pDocRes = xDocShRes->GetDocument();
CPPUNIT_ASSERT(pDocRes);
// Check the results of formula cells in the shared formula range.
for (SCROW i = 1; i < 5; ++i)
{
double fLibre = pDoc->GetValue(ScAddress(2, i, 0));
double fExcel = pDocRes->GetValue(ScAddress(2, i, 0));
CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel));
}
xDocSh->DoClose();
xDocShRes->DoClose();
}
void ScOpenclTest::testSharedFormulaXLSStockHistory()
{
#if 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment