summaryrefslogtreecommitdiff
path: root/svl/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-17 11:07:29 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-17 11:07:29 +0100
commit7e69e6485f9e961e9a4862d8252491104018975a (patch)
tree80b2882f818cd01adead7c02e17507ebb7b459d4 /svl/qa
parente75308f9099e3baebe7b283241e8b2fd799ef9ff (diff)
Adapted svl test_URIHelper to gbuild.
Diffstat (limited to 'svl/qa')
-rw-r--r--svl/qa/export.map34
-rw-r--r--svl/qa/unit/test_URIHelper.cxx (renamed from svl/qa/test_URIHelper.cxx)34
2 files changed, 14 insertions, 54 deletions
diff --git a/svl/qa/export.map b/svl/qa/export.map
deleted file mode 100644
index 3308588ef6f8..000000000000
--- a/svl/qa/export.map
+++ /dev/null
@@ -1,34 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-UDK_3_0_0 {
- global:
- cppunitTestPlugIn;
-
- local:
- *;
-};
diff --git a/svl/qa/test_URIHelper.cxx b/svl/qa/unit/test_URIHelper.cxx
index fe98d7104a83..d7cc5ab9b768 100644
--- a/svl/qa/test_URIHelper.cxx
+++ b/svl/qa/unit/test_URIHelper.cxx
@@ -29,12 +29,7 @@
#include "sal/config.h"
#include "sal/precppunit.hxx"
-#include <cppunit/TestSuite.h>
-#include <cppunit/TestFixture.h>
-#include <cppunit/TestCase.h>
-#include <cppunit/plugin/TestPlugIn.h>
-#include <cppunit/extensions/HelperMacros.h>
-
+#include <cassert>
#include <cstddef>
#include "com/sun/star/lang/Locale.hpp"
@@ -59,24 +54,23 @@
#include "cppuhelper/bootstrap.hxx"
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/implbase2.hxx"
-#include "osl/diagnose.h"
+#include "cppunit/TestCase.h"
+#include "cppunit/TestFixture.h"
+#include "cppunit/TestSuite.h"
+#include "cppunit/extensions/HelperMacros.h"
+#include "cppunit/plugin/TestPlugIn.h"
#include "rtl/strbuf.hxx"
#include "rtl/string.h"
#include "rtl/string.hxx"
#include "rtl/textenc.h"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
+#include "sal/macros.h"
#include "sal/types.h"
-#include <sal/macros.h>
+#include "svl/urihelper.hxx"
#include "tools/solar.h"
#include "unotools/charclass.hxx"
-#include "urihelper.hxx"
-
-// This test needs a UNO component context that supports various services (the
-// UCB, an UriReferenceFactory, ...), so it is best executed within an OOo
-// installation.
-
namespace com { namespace sun { namespace star { namespace ucb {
class XCommandEnvironment;
class XContentEventListener;
@@ -144,7 +138,7 @@ Content::Content(
css::uno::Reference< css::ucb::XContentIdentifier > const & identifier):
m_identifier(identifier)
{
- OSL_ASSERT(m_identifier.is());
+ assert(m_identifier.is());
rtl::OUString uri(m_identifier->getContentIdentifier());
if (!uri.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(m_prefix))
|| uri.indexOf('#', RTL_CONSTASCII_LENGTH(m_prefix)) != -1)
@@ -207,7 +201,7 @@ public:
css::uno::Reference< css::ucb::XContentIdentifier > const & id2)
throw (css::uno::RuntimeException)
{
- OSL_ASSERT(id1.is() && id2.is());
+ assert(id1.is() && id2.is());
return
id1->getContentIdentifier().compareTo(id2->getContentIdentifier());
}
@@ -263,12 +257,12 @@ void Test::testNormalizedMakeRelative() {
css::uno::UNO_QUERY_THROW)->registerContentProvider(
new Provider, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test")),
true);
- struct Test {
+ struct Data {
char const * base;
char const * absolute;
char const * relative;
};
- static Test const tests[] = {
+ static Data const tests[] = {
{ "hierarchical:/", "mailto:def@a.b.c.", "mailto:def@a.b.c." },
{ "hierarchical:/", "a/b/c", "a/b/c" },
{ "hierarchical:/a", "hierarchical:/a/b/c?d#e", "/a/b/c?d#e" },
@@ -329,13 +323,13 @@ void Test::testNormalizedMakeRelative() {
}
void Test::testFindFirstURLInText() {
- struct Test {
+ struct Data {
char const * input;
char const * result;
xub_StrLen begin;
xub_StrLen end;
};
- static Test const tests[] = {
+ static Data const tests[] = {
{ "...ftp://bla.bla.bla/blubber/...",
"ftp://bla.bla.bla/blubber/", 3, 29 },
{ "..\\ftp://bla.bla.bla/blubber/...", 0, 0, 0 },