[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 14 14:04:09 UTC 2020
sc/qa/unit/ucalc.hxx | 2 ++
sc/qa/unit/ucalc_formula.cxx | 19 +++++++++++++++++++
2 files changed, 21 insertions(+)
New commits:
commit dd78ef9ff26fa35a03ac655b0d96738170e8e08b
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Oct 14 13:37:56 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Oct 14 16:03:24 2020 +0200
tdf#133260: sc_ucalc: Add unittest
Change-Id: I4661057a3e65f0e5ab7b18d8ad44bcd08a659039
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104281
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli at libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 676fa52ab8d2..de29194c2887 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -566,6 +566,7 @@ public:
void testTdf97369();
void testTdf97587();
void testTdf107459();
+ void testTdf133260();
void testEmptyCalcDocDefaults();
@@ -874,6 +875,7 @@ public:
CPPUNIT_TEST(testTdf97369);
CPPUNIT_TEST(testTdf97587);
CPPUNIT_TEST(testTdf107459);
+ CPPUNIT_TEST(testTdf133260);
CPPUNIT_TEST(testEmptyCalcDocDefaults);
CPPUNIT_TEST(testPrecisionAsShown);
CPPUNIT_TEST(testProtectedSheetEditByRow);
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index fd652222bffa..83fbd63ec247 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -8520,6 +8520,25 @@ void Test::testTdf107459()
m_pDoc->DeleteTab(0);
}
+void Test::testTdf133260()
+{
+ CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Test"));
+
+ ScAddress aPos1(0,0,0);
+ m_pDoc->SetString(aPos1, "=SUM(ABS(MUNIT(2)))");
+
+ ScAddress aPos2(0,1,0);
+ m_pDoc->SetString(aPos2, "=SUM(ABS(MUNIT(2)*-1))");
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 2
+ // - Actual : 1
+ CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(aPos1));
+ CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(aPos2));
+
+ m_pDoc->DeleteTab(0);
+}
+
void Test::testMatConcat()
{
CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Test"));
More information about the Libreoffice-commits
mailing list