summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2019-05-01 22:48:02 +0000
committerJens Carl <j.carl43@gmx.de>2019-05-02 02:52:28 +0200
commit6f763a3fcd420ddd147459db0f836ef3e05e710f (patch)
tree5eccec1505e1ecce2ec67f706ed11767c1c7b966 /test
parent976bb31199baf8ded562323e35626c61ef5bffbe (diff)
tdf#45904 Move SearchDescriptor Java tests to C++
Move SearchDescriptor Java tests to C++ for ScCellSearchObj. Change-Id: I3c9ffbfc80c7fdc39d0e67fe8aae12605a8d04f5 Reviewed-on: https://gerrit.libreoffice.org/71644 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'test')
-rw-r--r--test/Library_subsequenttest.mk1
-rw-r--r--test/source/util/searchdescriptor.cxx65
2 files changed, 66 insertions, 0 deletions
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index 2d8a876d6a95..6bdde7dece5b 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -186,6 +186,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/text/textprintersettings \
test/source/text/textsettings \
test/source/text/textdocumentindex \
+ test/source/util/searchdescriptor \
test/source/util/xindent \
test/source/util/xmergeable \
test/source/util/xrefreshable \
diff --git a/test/source/util/searchdescriptor.cxx b/test/source/util/searchdescriptor.cxx
new file mode 100644
index 000000000000..a2b72ce588dc
--- /dev/null
+++ b/test/source/util/searchdescriptor.cxx
@@ -0,0 +1,65 @@
+/* -*- 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 <test/util/searchdescriptor.hxx>
+#include <test/unoapi_property_testers.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <cppunit/extensions/HelperMacros.h>
+
+using namespace css;
+
+namespace apitest
+{
+void SearchDescriptor::testSearchDescriptorProperties()
+{
+ uno::Reference<beans::XPropertySet> xPS(init(), uno::UNO_QUERY_THROW);
+
+ OUString aPropName;
+
+ aPropName = "SearchBackwards";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchCaseSensitive";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchWords";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchRegularExpression";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchStyles";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchSimilarity";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchSimilarityRelax";
+ testBooleanProperty(xPS, aPropName);
+
+ aPropName = "SearchSimilarityRemove";
+ testShortProperty(xPS, aPropName);
+
+ aPropName = "SearchSimilarityAdd";
+ testShortProperty(xPS, aPropName);
+
+ aPropName = "SearchSimilarityExchange";
+ testShortProperty(xPS, aPropName);
+
+ aPropName = "SearchWildcard";
+ testBooleanOptionalProperty(xPS, aPropName);
+}
+
+} // namespace apitest
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */