diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-09-28 15:48:09 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-09-28 17:55:26 +0100 |
commit | d0edcf0a554828232ab3c8edfbea22d611bfda2b (patch) | |
tree | 07b22ac005305e8c27fdec25fcadd65df4eeff48 /unotest/inc | |
parent | f29109cc5bfdfe13922f9ff2ec85bf0bd3f6dce8 (diff) |
split 'test' into 'unotest' and 'test' to help dependencies
Diffstat (limited to 'unotest/inc')
-rw-r--r-- | unotest/inc/unotest/detail/unotestdllapi.hxx | 41 | ||||
-rw-r--r-- | unotest/inc/unotest/gettestargument.hxx | 49 | ||||
-rw-r--r-- | unotest/inc/unotest/officeconnection.hxx | 71 | ||||
-rw-r--r-- | unotest/inc/unotest/oustringostreaminserter.hxx | 51 | ||||
-rw-r--r-- | unotest/inc/unotest/toabsolutefileurl.hxx | 47 | ||||
-rw-r--r-- | unotest/inc/unotest/uniquepipename.hxx | 47 |
6 files changed, 306 insertions, 0 deletions
diff --git a/unotest/inc/unotest/detail/unotestdllapi.hxx b/unotest/inc/unotest/detail/unotestdllapi.hxx new file mode 100644 index 000000000000..22adbdf040ad --- /dev/null +++ b/unotest/inc/unotest/detail/unotestdllapi.hxx @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef INCLUDED_UNOTEST_DETAIL_UNOTESTDLLAPI_HXX +#define INCLUDED_UNOTEST_DETAIL_UNOTESTDLLAPI_HXX + +#include "sal/config.h" +#include "sal/types.h" + +#if defined OOO_DLLIMPLEMENTATION_UNOTEST +#define OOO_DLLPUBLIC_UNOTEST SAL_DLLPUBLIC_EXPORT +#else +#define OOO_DLLPUBLIC_UNOTEST SAL_DLLPUBLIC_IMPORT +#endif + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotest/inc/unotest/gettestargument.hxx b/unotest/inc/unotest/gettestargument.hxx new file mode 100644 index 000000000000..4fe11147bc16 --- /dev/null +++ b/unotest/inc/unotest/gettestargument.hxx @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_TEST_GETTESTARGUMENT_HXX +#define INCLUDED_TEST_GETTESTARGUMENT_HXX + +#include "sal/config.h" + +#include "test/detail/testdllapi.hxx" + +namespace rtl { class OUString; } + +namespace test { + +// Obtain the value of a test argument (tunneled in via an "arg-testarg.<name>" +// bootstrap variable): +OOO_DLLPUBLIC_TEST bool getTestArgument( + rtl::OUString const & name, rtl::OUString * value); + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotest/inc/unotest/officeconnection.hxx b/unotest/inc/unotest/officeconnection.hxx new file mode 100644 index 000000000000..e5250ce6aedf --- /dev/null +++ b/unotest/inc/unotest/officeconnection.hxx @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef INCLUDED_TEST_OFFICECONNECTION_HXX +#define INCLUDED_TEST_OFFICECONNECTION_HXX + +#include "sal/config.h" + +#include "boost/noncopyable.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "osl/process.h" +#include "test/detail/testdllapi.hxx" + +namespace com { namespace sun { namespace star { namespace uno { + class XComponentContext; +} } } } + +namespace test { + +// Start up and shut down an OOo instance (details about the OOo instance are +// tunneled in via "arg-..." bootstrap variables): +class OOO_DLLPUBLIC_TEST OfficeConnection: private boost::noncopyable { +public: + OfficeConnection(); + + ~OfficeConnection(); + + void setUp(); + + void tearDown(); + + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > + getComponentContext() const; + + // Must not be called before setUp or after tearDown: + bool isStillAlive() const; + +private: + oslProcess process_; + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > + context_; +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotest/inc/unotest/oustringostreaminserter.hxx b/unotest/inc/unotest/oustringostreaminserter.hxx new file mode 100644 index 000000000000..2658cad31d67 --- /dev/null +++ b/unotest/inc/unotest/oustringostreaminserter.hxx @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef INCLUDED_TEST_OUSTRINGOSTREAMINSERTER_HXX +#define INCLUDED_TEST_OUSTRINGOSTREAMINSERTER_HXX + +#include "sal/config.h" + +#include <ostream> + +#include "osl/thread.h" +#include "rtl/ustring.hxx" + +// Include this header to support rtl::OUString in CPPUNIT_ASSERT macros. + +template< typename charT, typename traits > std::basic_ostream<charT, traits> & +operator <<( + std::basic_ostream<charT, traits> & stream, rtl::OUString const & string) +{ + return stream << + rtl::OUStringToOString(string, osl_getThreadTextEncoding()).getStr(); + // best effort; potentially loses data due to conversion failures and + // embedded null characters +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotest/inc/unotest/toabsolutefileurl.hxx b/unotest/inc/unotest/toabsolutefileurl.hxx new file mode 100644 index 000000000000..6548448b0356 --- /dev/null +++ b/unotest/inc/unotest/toabsolutefileurl.hxx @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef INCLUDED_TEST_TOABSOLUTEFILEURL_HXX +#define INCLUDED_TEST_TOABSOLUTEFILEURL_HXX + +#include "sal/config.h" + +#include "unotest/detail/unotestdllapi.hxx" + +namespace rtl { class OUString; } + +namespace test { + +// Convert a pathname in system notation, potentially relative to the process's +// current working directory, to an absolute file URL: +OOO_DLLPUBLIC_UNOTEST rtl::OUString toAbsoluteFileUrl( + rtl::OUString const & relativePathname); + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotest/inc/unotest/uniquepipename.hxx b/unotest/inc/unotest/uniquepipename.hxx new file mode 100644 index 000000000000..b66492ce271a --- /dev/null +++ b/unotest/inc/unotest/uniquepipename.hxx @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_TEST_UNIQUEPIPENAME_HXX +#define INCLUDED_TEST_UNIQUEPIPENAME_HXX + +#include "sal/config.h" + +#include "test/detail/testdllapi.hxx" + +namespace rtl { class OUString; } + +namespace test { + +// Create a system-wide unique name (for use with osl::Pipe): +OOO_DLLPUBLIC_TEST rtl::OUString uniquePipeName(rtl::OUString const & name); + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |