summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2019-01-25 03:16:29 +0000
committerJens Carl <j.carl43@gmx.de>2019-01-25 14:55:18 +0100
commit059a958a65e064b701a74f6cb87e295b13ffbd0e (patch)
tree444428bce14038dde6af49b3fb1b4436036eda29 /test
parent265a4fd43d207cd6a99fdd9c23d54259428ed709 (diff)
Add XMultiFormulaTokens tests to ScTableValidationObj
Change-Id: I6239cfba2b275c5f0b8794e30d57d1835ed569fa Reviewed-on: https://gerrit.libreoffice.org/66892 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/sheet/xmultiformulatokens.cxx44
2 files changed, 45 insertions, 0 deletions
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index 5ea8ade69775..e3f3bce700bb 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -113,6 +113,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/sheet/xheaderfootercontent \
test/source/sheet/xlabelrange \
test/source/sheet/xlabelranges \
+ test/source/sheet/xmultiformulatokens \
test/source/sheet/xmultipleoperation \
test/source/sheet/xnamedrange \
test/source/sheet/xnamedranges \
diff --git a/test/source/sheet/xmultiformulatokens.cxx b/test/source/sheet/xmultiformulatokens.cxx
new file mode 100644
index 000000000000..3478c0188602
--- /dev/null
+++ b/test/source/sheet/xmultiformulatokens.cxx
@@ -0,0 +1,44 @@
+/* -*- 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/xmultiformulatokens.hxx>
+
+#include <com/sun/star/sheet/FormulaToken.hpp>
+#include <com/sun/star/sheet/XMultiFormulaTokens.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <cppunit/extensions/HelperMacros.h>
+
+using namespace css;
+
+namespace apitest
+{
+void XMultiFormulaTokens::testGetCount()
+{
+ uno::Reference<sheet::XMultiFormulaTokens> xMFT(init(), uno::UNO_QUERY_THROW);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xMFT->getCount());
+}
+
+void XMultiFormulaTokens::testGetSetTokens()
+{
+ uno::Reference<sheet::XMultiFormulaTokens> xMFT(init(), uno::UNO_QUERY_THROW);
+
+ uno::Sequence<sheet::FormulaToken> aTokens(1);
+ aTokens[0].OpCode = 2;
+ xMFT->setTokens(0, aTokens);
+
+ CPPUNIT_ASSERT_EQUAL(aTokens[0].OpCode, xMFT->getTokens(0)[0].OpCode);
+}
+
+} // namespace apitest
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */