sw/qa/core/doc/doc.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) New commits: commit 9ed09fb1327e6cd10febe45c7f76ee1e46d99b5f Author: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> AuthorDate: Sat Jul 27 01:11:51 2024 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Aug 2 09:55:12 2024 +0200
tdf#158504: add unit test Change-Id: Ie0b11ea04e3ad50206dfa219ebe7f138c00861e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171089 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx index 0da481188cbe..2098176d7a4e 100644 --- a/sw/qa/core/doc/doc.cxx +++ b/sw/qa/core/doc/doc.cxx @@ -632,6 +632,15 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testVirtPageNumReset) CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(1), nVirt); } +CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testDefaultPageDescUsed) +{ + createSwDoc(); + auto pDoc = getSwDocShell()->GetDoc(); + CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetPageDescCnt()); + const SwPageDesc& rPageDesc = pDoc->GetPageDesc(0); + CPPUNIT_ASSERT(rPageDesc.IsUsed()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */