[Libreoffice-commits] .: 2 commits - comphelper/prj comphelper/qa
David Tardon
dtardon at kemper.freedesktop.org
Mon Feb 7 01:01:43 PST 2011
comphelper/prj/build.lst | 1 +
comphelper/qa/makefile.mk | 10 +++-------
comphelper/qa/test_string.cxx | 22 ++++++++++++----------
comphelper/qa/test_weakbag.cxx | 10 ++++++----
comphelper/qa/version.map | 3 +--
5 files changed, 23 insertions(+), 23 deletions(-)
New commits:
commit 9d42e6936b0725c39e4514d18edee16d478a67f3
Author: Wilhelm Pflueger <Wilhelm.Pflueger at web.de>
Date: Sat Feb 5 23:02:36 2011 +0100
Removed odd line.
diff --git a/comphelper/qa/test_string.cxx b/comphelper/qa/test_string.cxx
index 3a631d9..c525d31 100644
--- a/comphelper/qa/test_string.cxx
+++ b/comphelper/qa/test_string.cxx
@@ -82,6 +82,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION(TestString);
}
-//NOADDITIONAL;
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 3c8a234a8bcd0e75615c3a477aa062990ef9a71e
Author: Wilhelm Pflueger <Wilhelm.Pflueger at web.de>
Date: Sat Feb 5 22:56:20 2011 +0100
Re-animated tests that were based on deprecated testshl.
diff --git a/comphelper/prj/build.lst b/comphelper/prj/build.lst
index a38f999..d5eced0 100644
--- a/comphelper/prj/build.lst
+++ b/comphelper/prj/build.lst
@@ -11,3 +11,4 @@ ph comphelper\source\compare nmake - all ph_compare ph_inc NULL
ph comphelper\source\officeinstdir nmake - all ph_officeinstdir ph_inc NULL
ph comphelper\source\xml nmake - all ph_xml NULL
ph comphelper\util nmake - all ph_util ph_container ph_evtatmgr ph_misc ph_procfact ph_property ph_streaming ph_compare ph_officeinstdir ph_xml NULL
+ph comphelper\qa nmake - all ph_complex NULL
\ No newline at end of file
diff --git a/comphelper/qa/makefile.mk b/comphelper/qa/makefile.mk
index 0360d30..9d68caa 100644
--- a/comphelper/qa/makefile.mk
+++ b/comphelper/qa/makefile.mk
@@ -40,8 +40,8 @@ DLLPRE = # no leading "lib" on .so files
INCPRE += $(MISC)$/$(TARGET)$/inc
SHL1TARGET = $(TARGET)_weakbag
-SHL1OBJS = $(SLO)$/test_weakbag.obj
-SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
+SHL1OBJS = $(SLO)$/test_weakbag.obj $(SLO)$/test_string.obj
+SHL1STDLIBS = $(CPPUHELPERLIB) $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB) $(COMPHELPERLIB)
SHL1VERSIONMAP = version.map
SHL1IMPLIB = i$(SHL1TARGET)
DEF1NAME = $(SHL1TARGET)
@@ -49,8 +49,4 @@ DEF1NAME = $(SHL1TARGET)
SLOFILES = $(SHL1OBJS)
.INCLUDE: target.mk
-
-ALLTAR: test
-
-test .PHONY: $(SHL1TARGETN)
- $(TESTSHL2) $(SHL1TARGETN)
+.INCLUDE: _cppunit.mk
diff --git a/comphelper/qa/test_string.cxx b/comphelper/qa/test_string.cxx
index 7b997e6..3a631d9 100644
--- a/comphelper/qa/test_string.cxx
+++ b/comphelper/qa/test_string.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -30,7 +30,9 @@
#include "sal/config.h"
#include "comphelper/string.hxx"
-#include "testshl/simpleheader.hxx"
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
#include "rtl/string.h"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
@@ -38,20 +40,20 @@
namespace {
-class Test: public CppUnit::TestFixture {
+class TestString: public CppUnit::TestFixture {
public:
void test();
- CPPUNIT_TEST_SUITE(Test);
+ CPPUNIT_TEST_SUITE(TestString);
CPPUNIT_TEST(test);
CPPUNIT_TEST_SUITE_END();
};
-void Test::test() {
+void TestString::test() {
rtl::OUString s1(RTL_CONSTASCII_USTRINGPARAM("foobarbar"));
sal_Int32 n1;
rtl::OUString s2(
- comphelper::string::searchAndReplace(
+ comphelper::string::searchAndReplaceAsciiL(
s1, RTL_CONSTASCII_STRINGPARAM("bar"),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("baaz")), 0, &n1));
CPPUNIT_ASSERT(
@@ -59,7 +61,7 @@ void Test::test() {
CPPUNIT_ASSERT(n1 == 3);
sal_Int32 n2;
rtl::OUString s3(
- comphelper::string::searchAndReplace(
+ comphelper::string::searchAndReplaceAsciiL(
s2, RTL_CONSTASCII_STRINGPARAM("bar"),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bz")),
n1 + RTL_CONSTASCII_LENGTH("baaz"), &n2));
@@ -68,7 +70,7 @@ void Test::test() {
CPPUNIT_ASSERT(n2 == 7);
sal_Int32 n3;
rtl::OUString s4(
- comphelper::string::searchAndReplace(
+ comphelper::string::searchAndReplaceAsciiL(
s3, RTL_CONSTASCII_STRINGPARAM("bar"),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("baz")),
n2 + RTL_CONSTASCII_LENGTH("bz"), &n3));
@@ -76,10 +78,10 @@ void Test::test() {
CPPUNIT_ASSERT(n3 == -1);
}
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests");
+CPPUNIT_TEST_SUITE_REGISTRATION(TestString);
}
-NOADDITIONAL;
+//NOADDITIONAL;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/qa/test_weakbag.cxx b/comphelper/qa/test_weakbag.cxx
index acb6e56..774260e 100644
--- a/comphelper/qa/test_weakbag.cxx
+++ b/comphelper/qa/test_weakbag.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -33,7 +33,9 @@
#include "com/sun/star/uno/XInterface.hpp"
#include "comphelper/weakbag.hxx"
#include "cppuhelper/weak.hxx"
-#include "testshl/simpleheader.hxx"
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
namespace {
@@ -64,10 +66,10 @@ public:
CPPUNIT_TEST_SUITE_END();
};
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests");
+CPPUNIT_TEST_SUITE_REGISTRATION(Test);
}
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/qa/version.map b/comphelper/qa/version.map
index f313c44..65c1057 100644
--- a/comphelper/qa/version.map
+++ b/comphelper/qa/version.map
@@ -27,8 +27,7 @@
UDK_3_0_0 {
global:
- registerAllTestFunction;
-
+ cppunitTestPlugIn;
local:
*;
};
More information about the Libreoffice-commits
mailing list