summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2017-09-08 08:48:08 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-10-29 22:08:00 +0100
commita060947e8c1538cedae5dee6b2a4e7a15d434d66 (patch)
tree011c63786d430402f44837cab640669ca14d1657 /test
parent33a617aa43cf552b3a45b8391df28579883cd5de (diff)
tdf#45904: Move _XSubTotalDescriptor Java tests to C++
Change-Id: Ie1ec8879972f77c5278992aadf9324f755859d96 Reviewed-on: https://gerrit.libreoffice.org/42096 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'test')
-rw-r--r--test/Library_subsequenttest.mk1
-rw-r--r--test/source/sheet/xsubtotaldescriptor.cxx47
2 files changed, 48 insertions, 0 deletions
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index 2270669a0945..7c3e6b514cf3 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -77,6 +77,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/sheet/xviewpane \
test/source/sheet/xviewfreezable \
test/source/sheet/xviewsplitable \
+ test/source/sheet/xsubtotaldescriptor \
test/source/text/xtext \
test/source/text/xtextfield \
test/source/text/xtextcontent \
diff --git a/test/source/sheet/xsubtotaldescriptor.cxx b/test/source/sheet/xsubtotaldescriptor.cxx
new file mode 100644
index 000000000000..df81eb92fb39
--- /dev/null
+++ b/test/source/sheet/xsubtotaldescriptor.cxx
@@ -0,0 +1,47 @@
+/* -*- 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/sheet/xsubtotaldescriptor.hxx>
+
+#include <com/sun/star/sheet/GeneralFunction.hpp>
+#include <com/sun/star/sheet/SubTotalColumn.hpp>
+#include <com/sun/star/sheet/XSubTotalDescriptor.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <cppunit/extensions/HelperMacros.h>
+
+using namespace com::sun::star;
+using namespace com::sun::star::uno;
+
+namespace apitest {
+
+void XSubTotalDescriptor::testAddNew()
+{
+ uno::Reference< sheet::XSubTotalDescriptor > xSTD(init(), uno::UNO_QUERY_THROW);
+
+ uno::Sequence< sheet::SubTotalColumn > xCols;
+ xCols.realloc(1);
+ xCols[0].Column = 5;
+ xCols[0].Function = sheet::GeneralFunction_SUM;
+
+ CPPUNIT_ASSERT_NO_THROW_MESSAGE("Unable to add column", xSTD->addNew(xCols, 1));
+}
+
+void XSubTotalDescriptor::testClear()
+{
+ uno::Reference< sheet::XSubTotalDescriptor > xSTD(init(), UNO_QUERY_THROW);
+
+ CPPUNIT_ASSERT_NO_THROW_MESSAGE("Unable to clear XSubTotalDescriptor", xSTD->clear());
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */