[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 24 13:00:14 UTC 2021
sc/qa/unit/ucalc.cxx | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
New commits:
commit 0a3aa3f3c9b8b160dedd678dcfbca38b2f128c38
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon May 24 12:57:55 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon May 24 14:59:28 2021 +0200
tdf#137063: sc_ucalc: Add unittest
Change-Id: Ib9025784aac5742976a0e23c5cd7d64154925ed4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116049
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 76ffd606bbe9..d05656acca9e 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -168,6 +168,7 @@ public:
void testAutoFilterTimeValue();
void testTdf76441();
void testTdf142186();
+ void testTdf137063();
void testTdf126342();
void testAdvancedFilter();
void testTdf98642();
@@ -295,6 +296,7 @@ public:
CPPUNIT_TEST(testAutoFilterTimeValue);
CPPUNIT_TEST(testTdf76441);
CPPUNIT_TEST(testTdf142186);
+ CPPUNIT_TEST(testTdf137063);
CPPUNIT_TEST(testTdf126342);
CPPUNIT_TEST(testAdvancedFilter);
CPPUNIT_TEST(testTdf98642);
@@ -3642,6 +3644,22 @@ void Test::testTdf142186()
m_pDoc->DeleteTab(0);
}
+void Test::testTdf137063()
+{
+ m_pDoc->InsertTab(0, "Test");
+
+ m_pDoc->SetValue(0,0,0, 0.000000006);
+ m_pDoc->SetValue(0,1,0, 0.0000000006);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 0.000000006
+ // - Actual : 6E-09
+ CPPUNIT_ASSERT_EQUAL(OUString("0.000000006"), m_pDoc->GetString(ScAddress(0,0,0)));
+ CPPUNIT_ASSERT_EQUAL(OUString("6E-10"), m_pDoc->GetString(ScAddress(0,1,0)));
+
+ m_pDoc->DeleteTab(0);
+}
+
void Test::testTdf126342()
{
m_pDoc->InsertTab(0, "Test");
More information about the Libreoffice-commits
mailing list