diff options
author | Wilhelm Pflueger <Wilhelm.Pflueger@web.de> | 2011-03-11 14:47:06 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-03-15 08:52:39 +0100 |
commit | cfc40be4b620b33e10de94aa2963f2b3b9b30e73 (patch) | |
tree | 50e72cc35917da90733e7fdeaa11afc0576b2b07 /cppuhelper | |
parent | d559b0c5ace3c0c5125a67acc844b3d16d5ca991 (diff) |
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.
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/prj/build.lst | 2 | ||||
-rw-r--r-- | cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx | 10 | ||||
-rw-r--r-- | cppuhelper/qa/ifcontainer/export.map | 2 | ||||
-rw-r--r-- | cppuhelper/qa/unourl/cppu_unourl.cxx | 27 | ||||
-rw-r--r-- | cppuhelper/qa/unourl/export.map | 2 | ||||
-rw-r--r-- | cppuhelper/qa/weak/test_weak.cxx | 9 | ||||
-rw-r--r-- | 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 de66b2d61..784814aaa 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 79d14c141..97c95a1e1 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 879fa8953..117caf43a 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 792ff8999..f025c2f30 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 < SAL_N_ELEMENTS(aTests); ++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 < SAL_N_ELEMENTS(aTests); ++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 < SAL_N_ELEMENTS(aTests); ++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 < SAL_N_ELEMENTS(aTests); ++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 < SAL_N_ELEMENTS(aTests); ++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 < SAL_N_ELEMENTS(aTests); ++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 < SAL_N_ELEMENTS(aTests); ++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 < SAL_N_ELEMENTS(aTests); ++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 < SAL_N_ELEMENTS(aTests); ++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 879fa8953..117caf43a 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 9e0040b55..c45560c94 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 f313c44bd..0dbbcc5a7 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: *; |