From 0ab3f09011e4c4c1b85dda72f81f252899162ab5 Mon Sep 17 00:00:00 2001 From: anfanite396 Date: Sat, 12 Aug 2023 01:04:27 +0530 Subject: tdf#45904: Move _XFootnote Java tests to C++ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ibdc28ab8818860b9c94abeac33713607dbcf8df4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155635 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- test/Library_subsequenttest.mk | 1 + test/source/text/xfootnote.cxx | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 test/source/text/xfootnote.cxx (limited to 'test') diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk index f8fd36e1d2ba..9d06b435eb6b 100644 --- a/test/Library_subsequenttest.mk +++ b/test/Library_subsequenttest.mk @@ -193,6 +193,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\ test/source/text/numberingrules \ test/source/text/textcontent \ test/source/text/xautotextcontainer \ + test/source/text/xfootnote \ test/source/text/xsimpletext \ test/source/text/xtext \ test/source/text/xtextcontent \ diff --git a/test/source/text/xfootnote.cxx b/test/source/text/xfootnote.cxx new file mode 100644 index 000000000000..d46506bf1fd4 --- /dev/null +++ b/test/source/text/xfootnote.cxx @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include + +using namespace css; +using namespace css::uno; + +namespace apitest +{ +void XFootnote::testGetSetLabel() +{ + Reference xFootnote(init(), UNO_QUERY_THROW); + + rtl::OUString labelName = "New XFootnote Label"; + xFootnote->setLabel(labelName); + rtl::OUString newLabel = xFootnote->getLabel(); + CPPUNIT_ASSERT(!newLabel.isEmpty()); + CPPUNIT_ASSERT_EQUAL(labelName, newLabel); +} + +} // namespace apitest + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ -- cgit