diff options
author | Jens Carl <j.carl43@gmx.de> | 2019-04-16 19:21:58 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2019-04-17 01:11:58 +0200 |
commit | 5696272f9055b9b15c94d70a0dea7cee299c23ed (patch) | |
tree | d09a7c7bd51fe56819b98025f1d3bd9ec077b5f9 /test | |
parent | cc191e4f5da18c3b223316f39aac23003ca54671 (diff) |
tdf#45904 Move XTextField Java tests to C++
Move XTextField Java tests to C++ for ScEditFieldObj_Header (formerly
ScHeaderFieldObj).
Change-Id: I36b723945d9306720846b4a4e2d3eaddb1a1c063
Reviewed-on: https://gerrit.libreoffice.org/70841
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'test')
-rw-r--r-- | test/source/text/xtextfield.cxx | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/test/source/text/xtextfield.cxx b/test/source/text/xtextfield.cxx index 1d0abb22dad0..87fff9db3f83 100644 --- a/test/source/text/xtextfield.cxx +++ b/test/source/text/xtextfield.cxx @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * @@ -8,24 +8,37 @@ */ #include <test/text/xtextfield.hxx> +#include <rtl/string.hxx> + #include <com/sun/star/text/XTextField.hpp> + +#include <com/sun/star/uno/Reference.hxx> + #include <cppunit/extensions/HelperMacros.h> using namespace css; -using namespace css::uno; namespace apitest { - void XTextField::testGetPresentation() { - uno::Reference< text::XTextField > xTextField(init(), UNO_QUERY_THROW); + uno::Reference<text::XTextField> xTextField(init(), uno::UNO_QUERY_THROW); + OUString aString = xTextField->getPresentation(true); CPPUNIT_ASSERT(!aString.isEmpty()); aString = xTextField->getPresentation(false); CPPUNIT_ASSERT(!aString.isEmpty()); } +void XTextField::testGetPresentationEmptyString() +{ + uno::Reference<text::XTextField> xTextField(init(), uno::UNO_QUERY_THROW); + + OUString aString = xTextField->getPresentation(true); + CPPUNIT_ASSERT(aString.isEmpty()); + aString = xTextField->getPresentation(false); + CPPUNIT_ASSERT(aString.isEmpty()); } +} // namespace apitest -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |