diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-05-24 12:57:55 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-05-24 14:59:28 +0200 |
commit | 0a3aa3f3c9b8b160dedd678dcfbca38b2f128c38 (patch) | |
tree | df7881e1928ded541f8de431ff622208b5e76111 | |
parent | fix leak in SfxTabDialogController (diff) | |
download | core-0a3aa3f3c9b8b160dedd678dcfbca38b2f128c38.tar.gz core-0a3aa3f3c9b8b160dedd678dcfbca38b2f128c38.zip |
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@libreoffice.org>
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
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"); |