tdf#144209: sc_subsequent_filters_test2: Add unittest
Change-Id: I00a0f1efad4d003c7213117ede7f14fbdcb2c00e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121509
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sc/qa/unit/data/ods/tdf144209.ods b/sc/qa/unit/data/ods/tdf144209.ods
new file mode 100644
index 0000000..bf30dff
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf144209.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx b/sc/qa/unit/subsequent_filters_test2.cxx
index e4fddd0..bf0dee63 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -145,6 +145,7 @@ public:
void testTdf136364();
void testTdf103734();
void testTdf126116();
void testTdf144209();
void testTdf98844();
void testTdf100458();
void testTdf118561();
@@ -251,6 +252,7 @@ public:
CPPUNIT_TEST(testTdf136364);
CPPUNIT_TEST(testTdf103734);
CPPUNIT_TEST(testTdf126116);
CPPUNIT_TEST(testTdf144209);
CPPUNIT_TEST(testTdf98844);
CPPUNIT_TEST(testTdf100458);
CPPUNIT_TEST(testTdf118561);
@@ -1371,6 +1373,24 @@ void ScFiltersTest2::testTdf126116()
xDocSh->DoClose();
}
void ScFiltersTest2::testTdf144209()
{
ScDocShellRef xDocSh = loadDoc(u"tdf144209.", FORMAT_ODS);
CPPUNIT_ASSERT_MESSAGE("Failed to open doc", xDocSh.is());
ScDocument& rDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT_EQUAL(OUString("AA 0"), rDoc.GetString(ScAddress(0, 0, 0)));
xDocSh->DoHardRecalc();
// Without the fix in place, this test would have failed with
// - Expected: AA 33263342642.5385
// - Actual : AA 0
CPPUNIT_ASSERT_EQUAL(OUString("AA 33263342642.5385"), rDoc.GetString(ScAddress(0, 0, 0)));
xDocSh->DoClose();
}
void ScFiltersTest2::testTdf98844()
{
ScDocShellRef xDocSh = loadDoc(u"tdf98844.", FORMAT_ODS);