[Libreoffice-commits] core.git: sc/qa

Markus Mohrhard markus.mohrhard at googlemail.com
Fri Mar 17 00:59:15 UTC 2017


 sc/qa/unit/ucalc.hxx         |    2 ++
 sc/qa/unit/ucalc_formula.cxx |   21 +++++++++++++++++++++
 2 files changed, 23 insertions(+)

New commits:
commit 01667d040d9280ee2d918a4bc4a5147e870c039c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Mar 17 00:46:09 2017 +0100

    add test for tdf#106459
    
    Change-Id: I2a8c8d5fe253c08c5e3c7b57e6df677ebe7e384d
    Reviewed-on: https://gerrit.libreoffice.org/35305
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 92f0d6dd04d5..c48a25f126af 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -134,6 +134,7 @@ public:
     void testFormulaCreateStringFromTokens();
     void testFormulaParseReference();
     void testFetchVectorRefArray();
+    void testGroupConverter3D();
     void testFormulaHashAndTag();
     void testFormulaTokenEquality();
     void testFormulaRefData();
@@ -529,6 +530,7 @@ public:
     CPPUNIT_TEST(testFormulaCreateStringFromTokens);
     CPPUNIT_TEST(testFormulaParseReference);
     CPPUNIT_TEST(testFetchVectorRefArray);
+    CPPUNIT_TEST(testGroupConverter3D);
     // CPPUNIT_TEST(testFormulaHashAndTag);
     CPPUNIT_TEST(testFormulaTokenEquality);
     CPPUNIT_TEST(testFormulaRefData);
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 7604e08bb4a6..6c288bce48e4 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -781,6 +781,27 @@ void Test::testFetchVectorRefArray()
     m_pDoc->DeleteTab(0);
 }
 
+void Test::testGroupConverter3D()
+{
+    m_pDoc->InsertTab(0, "Test");
+    m_pDoc->InsertTab(1, "Test2");
+
+    m_pDoc->SetValue(1, 0, 0, 1.0);
+    m_pDoc->SetValue(1, 0, 1, 2.0);
+
+    for (SCROW nRow = 0; nRow < 200; ++nRow)
+    {
+        OUString aFormula = "=SUM(Test.B" + OUString::number(nRow+1) + ":Test2.B" + OUString::number(nRow+1) + ")";
+        m_pDoc->SetString(0, nRow, 0, aFormula);
+    }
+
+    double nVal = m_pDoc->GetValue(0, 0, 0);
+    CPPUNIT_ASSERT_EQUAL(3.0, nVal);
+
+    m_pDoc->DeleteTab(1);
+    m_pDoc->DeleteTab(0);
+}
+
 void Test::testFormulaHashAndTag()
 {
     m_pDoc->InsertTab(0, "Test");


More information about the Libreoffice-commits mailing list