diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-08-01 19:01:00 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-08-01 19:19:04 +0300 |
commit | 850d9be56d50a1b143d6afe679808723d6164e21 (patch) | |
tree | 5782c65af03802d8a8ea894706ea44baa4b3aaff /cppu | |
parent | ff54a3c291b8aa104992a0285207166cf25ddd86 (diff) |
Bin no longer used iOS cppunit stuff that breaks build even
Change-Id: I78c71b22816834c66c8283e3d85e357b7b8d2836
Diffstat (limited to 'cppu')
-rw-r--r-- | cppu/qa/cppu_cppunittester_all.cxx | 140 | ||||
-rw-r--r-- | cppu/qa/test_any.cxx | 4 | ||||
-rw-r--r-- | cppu/qa/test_recursion.cxx | 4 | ||||
-rw-r--r-- | cppu/qa/test_reference.cxx | 4 | ||||
-rw-r--r-- | cppu/qa/test_unotype.cxx | 4 |
5 files changed, 0 insertions, 156 deletions
diff --git a/cppu/qa/cppu_cppunittester_all.cxx b/cppu/qa/cppu_cppunittester_all.cxx deleted file mode 100644 index 49f1756320cb..000000000000 --- a/cppu/qa/cppu_cppunittester_all.cxx +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- 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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <cstdlib> -#include <iostream> -#include <limits> -#include <string> -#include "protectorfactory.hxx" -#include "osl/module.h" -#include "osl/module.hxx" -#include "osl/thread.h" -#include "rtl/process.h" -#include "rtl/string.h" -#include "rtl/string.hxx" -#include "rtl/textcvt.h" -#include "rtl/ustring.hxx" -#include "sal/main.h" -#include "sal/types.h" - -#include "cppunit/CompilerOutputter.h" -#include "cppunit/TestResult.h" -#include "cppunit/TestResultCollector.h" -#include "cppunit/TestRunner.h" -#include "cppunit/plugin/TestPlugIn.h" -#include "cppunit/plugin/PlugInParameters.h" -#include "cppunit/extensions/TestFactoryRegistry.h" -#include "cppunit/portability/Stream.h" -#include "cppunit/plugin/DynamicLibraryManagerException.h" - -#include "boost/noncopyable.hpp" - -namespace { - -void usageFailure() { - std::cerr - << ("Usage: cppunittester (--protector <shared-library-path>" - " <function-symbol>)* <shared-library-path>") - << std::endl; - std::exit(EXIT_FAILURE); -} - -rtl::OUString getArgument(sal_Int32 index) { - rtl::OUString arg; - rtl_getAppCommandArg(index, &arg.pData); - return arg; -} - -std::string convertLazy(rtl::OUString const & s16) { - rtl::OString s8(rtl::OUStringToOString(s16, osl_getThreadTextEncoding())); - return std::string( - s8.getStr(), - ((static_cast< sal_uInt32 >(s8.getLength()) - > (std::numeric_limits< std::string::size_type >::max)()) - ? (std::numeric_limits< std::string::size_type >::max)() - : static_cast< std::string::size_type >(s8.getLength()))); -} - -//Allow the whole uniting testing framework to be run inside a "Protector" -//which knows about uno exceptions, so it can print the content of the -//exception before falling over and dying -class CPPUNIT_API ProtectedFixtureFunctor : public CppUnit::Functor, private boost::noncopyable -{ -private: - const std::string &args; - CppUnit::TestResult &result; -public: - ProtectedFixtureFunctor(const std::string &args_, CppUnit::TestResult &result_) - : args(args_) - , result(result_) - { - } - bool run() const - { - bool bSuccess = false; - try { - CppUnit::TestRunner runner; - runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); - CppUnit::TestResultCollector collector; - result.addListener(&collector); - runner.run(result); - CppUnit::CompilerOutputter(&collector, CppUnit::stdCErr()).write(); - bSuccess = collector.wasSuccessful(); - } catch( CppUnit::DynamicLibraryManagerException& e) { - std::cerr << "DynamicLibraryManagerException: \"" << e.what() << "\"\n"; - } - return bSuccess; - } - virtual bool operator()() const - { - return run(); - } -}; -} - -extern "C" CppUnitTestPlugIn - *cppunitTest_qa_cppu_any(void), - *cppunitTest_qa_cppu_unotype(void), - *cppunitTest_qa_cppu_reference(void), - *cppunitTest_qa_cppu_recursion(void); - - -SAL_IMPLEMENT_MAIN() { - TestPlugInSignature plugs[] = { - cppunitTest_qa_cppu_any, - cppunitTest_qa_cppu_unotype, - cppunitTest_qa_cppu_reference, - cppunitTest_qa_cppu_recursion, - NULL - }; - CppUnit::TestResult result; - std::string args; - bool ok = false; - for (TestPlugInSignature *plug = plugs; *plug != NULL; plug++) { - CppUnitTestPlugIn *iface; - iface = (*plug)(); - iface->initialize(&CppUnit::TestFactoryRegistry::getRegistry(), CppUnit::PlugInParameters()); - } - ProtectedFixtureFunctor tests(args, result); - ok = tests.run(); - - return ok ? EXIT_SUCCESS : EXIT_FAILURE; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx index 6c8aee0a6b48..3bb86f629f51 100644 --- a/cppu/qa/test_any.cxx +++ b/cppu/qa/test_any.cxx @@ -19,10 +19,6 @@ #include <sal/types.h> -#ifdef IOS -#define CPPUNIT_PLUGIN_EXPORTED_NAME cppunitTest_qa_cppu_any -#endif - #include <stdlib.h> // wntmsci10 does not like <cstdlib> #include <cppunit/TestSuite.h> diff --git a/cppu/qa/test_recursion.cxx b/cppu/qa/test_recursion.cxx index 81e8c6002f47..ab390fafdfbe 100644 --- a/cppu/qa/test_recursion.cxx +++ b/cppu/qa/test_recursion.cxx @@ -19,10 +19,6 @@ #include <sal/types.h> -#ifdef IOS -#define CPPUNIT_PLUGIN_EXPORTED_NAME cppunitTest_qa_cppu_recursion -#endif - #include <cppunit/TestSuite.h> #include <cppunit/TestFixture.h> #include <cppunit/TestCase.h> diff --git a/cppu/qa/test_reference.cxx b/cppu/qa/test_reference.cxx index 12173c350985..6fc2cfea0263 100644 --- a/cppu/qa/test_reference.cxx +++ b/cppu/qa/test_reference.cxx @@ -19,10 +19,6 @@ #include <sal/types.h> -#ifdef IOS -#define CPPUNIT_PLUGIN_EXPORTED_NAME cppunitTest_qa_cppu_reference -#endif - #include <cppunit/TestSuite.h> #include <cppunit/TestFixture.h> #include <cppunit/TestCase.h> diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx index a7e545dcfea6..0b370d754ea6 100644 --- a/cppu/qa/test_unotype.cxx +++ b/cppu/qa/test_unotype.cxx @@ -19,10 +19,6 @@ #include <sal/types.h> -#ifdef IOS -#define CPPUNIT_PLUGIN_EXPORTED_NAME cppunitTest_qa_cppu_unotype -#endif - #include <cppunit/TestSuite.h> #include <cppunit/TestFixture.h> #include <cppunit/TestCase.h> |