Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


I attach some other reanimated tests. 

I had to deactivate the test 'test_weak.cxx' in prj/build.lst.
This test failed with 'error 139' - this is typically a segfault
during test execution, oops.

I had no time to investigate this issue up to now, sorry.

Wilhelm
From 7e69d8f2b3e09c75b21dee9d0849442d26095cb5 Mon Sep 17 00:00:00 2001
From: Wilhelm Pflueger <Wilhelm.Pflueger@web.de>
Date: Fri, 11 Mar 2011 14:47:06 +0100
Subject: [PATCH] EasyHacks: Reanimated tests in ure/cppuhelper/qa.

I had to deactivate the test 'test_weak.cxx' in prj/build.lst.
This test failed with 'error 139' - this is typically a segfault
during test execution, oops.
---
 cppuhelper/prj/build.lst                       |    2 +
 cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx |   10 +++++---
 cppuhelper/qa/ifcontainer/export.map           |    2 +-
 cppuhelper/qa/unourl/cppu_unourl.cxx           |   27 ++++++++++++-----------
 cppuhelper/qa/unourl/export.map                |    2 +-
 cppuhelper/qa/weak/test_weak.cxx               |    9 +++++--
 cppuhelper/qa/weak/version.map                 |    2 +-
 7 files changed, 31 insertions(+), 23 deletions(-)

diff --git a/cppuhelper/prj/build.lst b/cppuhelper/prj/build.lst
index de66b2d..784814a 100644
--- a/cppuhelper/prj/build.lst
+++ b/cppuhelper/prj/build.lst
@@ -4,3 +4,5 @@ ch      cppuhelper\inc                                                  nmake   -   
    all     ch_include NULL
 ch     cppuhelper\source                                               nmake   -       all     
ch_source ch_unotypes ch_include NULL
 ch     cppuhelper\unotypes                                             nmake   -       all     
ch_unotypes NULL
 ch cppuhelper\qa\propertysetmixin nmake - all ch_qa_propertysetmixin ch_source NULL
+ch  cppuhelper\qa\ifcontainer               nmake   -   all ch_qa_ifcontainer NULL
+ch  cppuhelper\qa\unourl                    nmake   -   all ch_qa_unourl NULL
diff --git a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx 
b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
index 79d14c1..97c95a1 100644
--- a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
+++ b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
@@ -26,7 +26,10 @@
  *
  ************************************************************************/
 
-#include <testshl/simpleheader.hxx>
+#include <string.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
 
 #include "com/sun/star/lang/XEventListener.hpp"
 #include "cppuhelper/interfacecontainer.hxx"
@@ -278,9 +281,8 @@ namespace cppu_ifcontainer
     };
 } // namespace cppu_ifcontainer
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(cppu_ifcontainer::IfTest,
-                                      "cppu_ifcontainer");
+CPPUNIT_TEST_SUITE_REGISTRATION(cppu_ifcontainer::IfTest);
 
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppuhelper/qa/ifcontainer/export.map b/cppuhelper/qa/ifcontainer/export.map
index 879fa89..117caf4 100644
--- a/cppuhelper/qa/ifcontainer/export.map
+++ b/cppuhelper/qa/ifcontainer/export.map
@@ -1,6 +1,6 @@
 UDK_3_0_0 {
     global:
-        registerAllTestFunction;
+        cppunitTestPlugIn;
 
     local:
         *;
diff --git a/cppuhelper/qa/unourl/cppu_unourl.cxx b/cppuhelper/qa/unourl/cppu_unourl.cxx
index 792ff89..080cd85 100644
--- a/cppuhelper/qa/unourl/cppu_unourl.cxx
+++ b/cppuhelper/qa/unourl/cppu_unourl.cxx
@@ -26,7 +26,9 @@
  *
  ************************************************************************/
 
-#include <testshl/simpleheader.hxx>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
 
 #include "cppuhelper/unourl.hxx"
 #include "rtl/malformeduriexception.hxx"
@@ -77,7 +79,7 @@ namespace cppu_unourl
                     { "abc,def=%22", true },
                     { "abc,def=\"", true },
                     { "abc,def=%ed%a0%80", true } };
-            for (int i = 0; i < sizeof aTests / sizeof (Test); ++i)
+            for (unsigned int i = 0; i < sizeof aTests / sizeof (Test); ++i)
             {
                 bool bValid = false;
                 try
@@ -126,7 +128,7 @@ namespace cppu_unourl
                    { "abc,def=%22", "abc,def=%22" },
                    { "abc,def=\"", "abc,def=\"" },
                    { "abc,def=%ed%a0%80", "abc,def=%ed%a0%80" } };
-            for (int i = 0; i < sizeof aTests / sizeof (Test); ++i)
+            for (unsigned int i = 0; i < sizeof aTests / sizeof (Test); ++i)
             {
                 bool bValid = false;
                 rtl::OUString aDescriptor;
@@ -174,7 +176,7 @@ namespace cppu_unourl
                     { "abc,def=%22", "abc" },
                     { "abc,def=\"", "abc" },
                     { "abc,def=%ed%a0%80", "abc" } };
-            for (int i = 0; i < sizeof aTests / sizeof (Test); ++i)
+            for (unsigned int i = 0; i < sizeof aTests / sizeof (Test); ++i)
             {
                 bool bValid = false;
                 rtl::OUString aName;
@@ -219,7 +221,7 @@ namespace cppu_unourl
                     { "abc,def=xxx,ghi=xxx", "def", true },
                     { "abc,def=xxx,ghi=xxx", "ghi", true },
                     { "abc,def=xxx,ghi=xxx", "jkl", false } };
-            for (int i = 0; i < sizeof aTests / sizeof (Test); ++i)
+            for (unsigned int i = 0; i < sizeof aTests / sizeof (Test); ++i)
             {
                 bool bValid = false;
                 bool bPresent = false;
@@ -289,7 +291,7 @@ namespace cppu_unourl
                     { "abc,abc=,def=Abc", "def", "Abc" },
                     { "abc,abc=,def=aBC", "def", "aBC" },
                     { "abc,abc=,def=ABC", "def", "ABC" } };
-            for (int i = 0; i < sizeof aTests / sizeof (Test); ++i)
+            for (unsigned int i = 0; i < sizeof aTests / sizeof (Test); ++i)
             {
                 bool bValid = false;
                 rtl::OUString aValue;
@@ -332,7 +334,7 @@ namespace cppu_unourl
                     { "uno:abc;def;1", true },
                     { "uno:abc;def;$&+,/:=?@", true },
                     { "uno:abc;def;%24&+,/:=?@", false } };
-            for (int i = 0; i < sizeof aTests / sizeof (Test); ++i)
+            for (unsigned int i = 0; i < sizeof aTests / sizeof (Test); ++i)
             {
                 bool bValid = false;
                 try
@@ -369,7 +371,7 @@ namespace cppu_unourl
                     { "uno:ABC;def;ghi", "ABC" },
                     { "uno:abc,def=xxx,ghi=xxx;def,ghi=xxx,jkl=xxx;ghi",
                       "abc,def=xxx,ghi=xxx" } };
-            for (int i = 0; i < sizeof aTests / sizeof (Test); ++i)
+            for (unsigned int i = 0; i < sizeof aTests / sizeof (Test); ++i)
             {
                 bool bValid = false;
                 rtl::OUString aConnection;
@@ -403,7 +405,7 @@ namespace cppu_unourl
                     { "uno:abc;DEF;ghi", "DEF" },
                     { "uno:abc,def=xxx,ghi=xxx;def,ghi=xxx,jkl=xxx;ghi",
                       "def,ghi=xxx,jkl=xxx" } };
-            for (int i = 0; i < sizeof aTests / sizeof (Test); ++i)
+            for (unsigned int i = 0; i < sizeof aTests / sizeof (Test); ++i)
             {
                 bool bValid = false;
                 rtl::OUString aProtocol;
@@ -440,7 +442,7 @@ namespace cppu_unourl
                     { "uno:abc;def;A", "A" },
                     { "uno:abc;def;1", "1" },
                     { "uno:abc;def;$&+,/:=?@", "$&+,/:=?@" } };
-            for (int i = 0; i < sizeof aTests / sizeof (Test); ++i)
+            for (unsigned int i = 0; i < sizeof aTests / sizeof (Test); ++i)
             {
                 bool bValid = false;
                 rtl::OUString aObjectName;
@@ -474,9 +476,8 @@ namespace cppu_unourl
     };
 } // namespace cppu_ifcontainer
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(cppu_unourl::UrlTest,
-                                      "cppu_unourl");
+CPPUNIT_TEST_SUITE_REGISTRATION(cppu_unourl::UrlTest);
 
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppuhelper/qa/unourl/export.map b/cppuhelper/qa/unourl/export.map
index 879fa89..117caf4 100644
--- a/cppuhelper/qa/unourl/export.map
+++ b/cppuhelper/qa/unourl/export.map
@@ -1,6 +1,6 @@
 UDK_3_0_0 {
     global:
-        registerAllTestFunction;
+        cppunitTestPlugIn;
 
     local:
         *;
diff --git a/cppuhelper/qa/weak/test_weak.cxx b/cppuhelper/qa/weak/test_weak.cxx
index 9e0040b..c45560c 100644
--- a/cppuhelper/qa/weak/test_weak.cxx
+++ b/cppuhelper/qa/weak/test_weak.cxx
@@ -29,6 +29,10 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_cppuhelper.hxx"
 
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
+
 #include "sal/config.h"
 
 #include "com/sun/star/lang/DisposedException.hpp"
@@ -39,7 +43,6 @@
 #include "com/sun/star/uno/XWeak.hpp"
 #include "cppuhelper/implbase1.hxx"
 #include "cppuhelper/weak.hxx"
-#include "testshl/simpleheader.hxx"
 #include "rtl/ref.hxx"
 #include "sal/types.h"
 
@@ -103,10 +106,10 @@ void Test::testReferenceDispose() {
     CPPUNIT_ASSERT(r3->isDisposed());
 }
 
-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/cppuhelper/qa/weak/version.map b/cppuhelper/qa/weak/version.map
index f313c44..0dbbcc5 100644
--- a/cppuhelper/qa/weak/version.map
+++ b/cppuhelper/qa/weak/version.map
@@ -27,7 +27,7 @@
 
 UDK_3_0_0 {
     global:
-        registerAllTestFunction;
+        cppunitTestPlugIn;
 
     local:
         *;
-- 
1.7.0.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.