You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libreoffice/0012-add-writerperfect-calc...

147 lines
4.8 KiB

From 6a79c9ce401e98c4fa90a870ed29770db3f9f9e2 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 29 May 2014 15:35:15 +0200
Subject: [PATCH 12/18] add writerperfect calc integration test
Change-Id: I3ce072f5f7d54b063988f8413251eab00f5321e4
(cherry picked from commit b6ea5de5eda77fa1bb0b7ee8248f001d58bae6be)
---
writerperfect/CppunitTest_writerperfect_calc.mk | 46 ++++++++++++++++++++++
writerperfect/Module_writerperfect.mk | 1 +
writerperfect/qa/unit/WpftCalcFilterTest.cxx | 43 ++++++++++++++++++++
.../qa/unit/data/calc/libwps/fail/.gitignore | 0
.../unit/data/calc/libwps/indeterminate/.gitignore | 0
.../qa/unit/data/calc/libwps/pass/.gitignore | 0
6 files changed, 90 insertions(+)
create mode 100644 writerperfect/CppunitTest_writerperfect_calc.mk
create mode 100644 writerperfect/qa/unit/WpftCalcFilterTest.cxx
create mode 100644 writerperfect/qa/unit/data/calc/libwps/fail/.gitignore
create mode 100644 writerperfect/qa/unit/data/calc/libwps/indeterminate/.gitignore
create mode 100644 writerperfect/qa/unit/data/calc/libwps/pass/.gitignore
diff --git a/writerperfect/CppunitTest_writerperfect_calc.mk b/writerperfect/CppunitTest_writerperfect_calc.mk
new file mode 100644
index 0000000..1a05595
--- /dev/null
+++ b/writerperfect/CppunitTest_writerperfect_calc.mk
@@ -0,0 +1,46 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,writerperfect_calc))
+
+$(eval $(call gb_CppunitTest_use_externals,writerperfect_calc,\
+ boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_use_api,writerperfect_calc,\
+ offapi \
+ udkapi \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,writerperfect_calc,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ test \
+ ucbhelper \
+ unotest \
+ $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_static_libraries,writerperfect_calc,\
+ writerperfect_importtestbase \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,writerperfect_calc))
+
+$(eval $(call gb_CppunitTest_use_rdb,writerperfect_calc,services))
+
+$(eval $(call gb_CppunitTest_use_configuration,writerperfect_calc))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,writerperfect_calc,\
+ writerperfect/qa/unit/WpftCalcFilterTest \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/writerperfect/Module_writerperfect.mk b/writerperfect/Module_writerperfect.mk
index 37da37c..9c30697 100644
--- a/writerperfect/Module_writerperfect.mk
+++ b/writerperfect/Module_writerperfect.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_Module_add_check_targets,writerperfect,\
))
$(eval $(call gb_Module_add_slowcheck_targets,writerperfect,\
+ CppunitTest_writerperfect_calc \
CppunitTest_writerperfect_draw \
CppunitTest_writerperfect_impress \
CppunitTest_writerperfect_writer \
diff --git a/writerperfect/qa/unit/WpftCalcFilterTest.cxx b/writerperfect/qa/unit/WpftCalcFilterTest.cxx
new file mode 100644
index 0000000..ba1ed1e
--- /dev/null
+++ b/writerperfect/qa/unit/WpftCalcFilterTest.cxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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 "WpftImportTestBase.hxx"
+
+namespace
+{
+
+class WpftCalcFilterTest : public writerperfect::test::WpftImportTestBase
+{
+public:
+ WpftCalcFilterTest();
+
+ void test();
+
+ CPPUNIT_TEST_SUITE(WpftCalcFilterTest);
+ CPPUNIT_TEST(test);
+ CPPUNIT_TEST_SUITE_END();
+};
+
+WpftCalcFilterTest::WpftCalcFilterTest()
+ : writerperfect::test::WpftImportTestBase("private:factory/scalc")
+{
+}
+
+void WpftCalcFilterTest::test()
+{
+ doTest("com.sun.star.comp.Calc.MSWorksCalcImportFilter", "/writerperfect/qa/unit/data/calc/libwps/");
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(WpftCalcFilterTest);
+
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/qa/unit/data/calc/libwps/fail/.gitignore b/writerperfect/qa/unit/data/calc/libwps/fail/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/writerperfect/qa/unit/data/calc/libwps/indeterminate/.gitignore b/writerperfect/qa/unit/data/calc/libwps/indeterminate/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/writerperfect/qa/unit/data/calc/libwps/pass/.gitignore b/writerperfect/qa/unit/data/calc/libwps/pass/.gitignore
new file mode 100644
index 0000000..e69de29
--
1.9.3