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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 9 17:41:35 UTC 2020


 sc/qa/unit/ucalc.cxx |   15 +++++++++++++++
 sc/qa/unit/ucalc.hxx |    2 ++
 2 files changed, 17 insertions(+)

New commits:
commit e7b0e0b2b0df7197ee04c5c7232145d7a044bae0
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Sep 9 17:52:20 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Sep 9 19:40:54 2020 +0200

    tdf#90698: sc_ucalc: Add unittest
    
    Change-Id: I37a7719ec759bb269f17fd371285893a348a7501
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102329
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 6cd9a5db7ba0..41bc846640cb 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -456,6 +456,21 @@ void Test::testColumnIterator() // tdf#118620
     m_pDoc->DeleteTab(0);
 }
 
+void Test::testTdf90698()
+{
+    CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Test"));
+    m_pDoc->SetString(ScAddress(0,0,0), "=(1;2)");
+
+    // Without the fix in place, this would have failed with
+    // - Expected: =(1;2)
+    // - Actual  : =(1~2)
+    OUString aFormula;
+    m_pDoc->GetFormula(0,0,0, aFormula);
+    CPPUNIT_ASSERT_EQUAL(OUString("=(1;2)"), aFormula);
+
+    m_pDoc->DeleteTab(0);
+}
+
 void Test::testTdf135249()
 {
     CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Test"));
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index cba0a60c8143..0f07a8fd32b8 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -126,6 +126,7 @@ public:
     void testMarkData();
     void testInput();
     void testColumnIterator();
+    void testTdf90698();
     void testTdf135249();
     void testDocStatistics();
     void testRowForHeight();
@@ -582,6 +583,7 @@ public:
     CPPUNIT_TEST(testMarkData);
     CPPUNIT_TEST(testInput);
     CPPUNIT_TEST(testColumnIterator);
+    CPPUNIT_TEST(testTdf90698);
     CPPUNIT_TEST(testTdf135249);
     CPPUNIT_TEST(testDocStatistics);
     CPPUNIT_TEST(testRowForHeight);


More information about the Libreoffice-commits mailing list