[PATCH 1/2] Re-animated tests that were based on testshl.

Wilhelm Pflueger Wilhelm.Pflueger at web.de
Sat Feb 5 13:31:57 PST 2011


One test in test_outstring_convert.cxx fails for method
rtl::OUString::convertToString().
---
 sal/prj/build.lst                                 |    1 +
 sal/qa/rtl/strings/test_oustring_compare.cxx      |    6 ++++--
 sal/qa/rtl/strings/test_oustring_convert.cxx      |    5 +++--
 sal/qa/rtl/strings/test_oustring_endswith.cxx     |    5 +++--
 sal/qa/rtl/strings/test_oustring_noadditional.cxx |    4 ++--
 sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx  |   15 +++++++++------
 6 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/sal/prj/build.lst b/sal/prj/build.lst
index cafca8a..02c1a44 100644
--- a/sal/prj/build.lst
+++ b/sal/prj/build.lst
@@ -18,3 +18,4 @@ sa sal\qa\ByteSequence nmake - all sa_qa_ByteSequence sa_cppunittester sa_util N
 sa sal\qa\OStringBuffer nmake - all sa_qa_OStringBuffer sa_cppunittester sa_util NULL
 sa sal\qa\osl\mutex nmake - all sa_qa_osl_mutex sa_cppunittester sa_util NULL
 sa sal\qa\osl\profile nmake - all sa_qa_osl_profile sa_cppunittester sa_util NULL
+sa sal\qa\rtl\strings nmake - all sa_qa_rt_strings sa_cppunittester sa_util NULL
diff --git a/sal/qa/rtl/strings/test_oustring_compare.cxx b/sal/qa/rtl/strings/test_oustring_compare.cxx
index a274514..bb28cf4 100644
--- a/sal/qa/rtl/strings/test_oustring_compare.cxx
+++ b/sal/qa/rtl/strings/test_oustring_compare.cxx
@@ -29,7 +29,9 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sal.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.hxx"
 
@@ -47,7 +49,7 @@ private:
 
 } }
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(test::oustring::Compare, "alltest");
+CPPUNIT_TEST_SUITE_REGISTRATION(test::oustring::Compare);
 
 void test::oustring::Compare::equalsIgnoreAsciiCaseAscii()
 {
diff --git a/sal/qa/rtl/strings/test_oustring_convert.cxx b/sal/qa/rtl/strings/test_oustring_convert.cxx
index c0705e2..f675390 100644
--- a/sal/qa/rtl/strings/test_oustring_convert.cxx
+++ b/sal/qa/rtl/strings/test_oustring_convert.cxx
@@ -29,7 +29,8 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sal.hxx"
 
-#include "testshl/simpleheader.hxx"
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
 #include "rtl/strbuf.hxx"
 #include "rtl/string.hxx"
 #include "rtl/ustring.hxx"
@@ -49,7 +50,7 @@ private:
 
 } }
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(test::oustring::Convert, "alltest");
+CPPUNIT_TEST_SUITE_REGISTRATION(test::oustring::Convert);
 
 namespace {
 
diff --git a/sal/qa/rtl/strings/test_oustring_endswith.cxx b/sal/qa/rtl/strings/test_oustring_endswith.cxx
index 4f2ae1f..d2a41d2 100644
--- a/sal/qa/rtl/strings/test_oustring_endswith.cxx
+++ b/sal/qa/rtl/strings/test_oustring_endswith.cxx
@@ -29,7 +29,8 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sal.hxx"
 
-#include "testshl/simpleheader.hxx"
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
 #include "rtl/strbuf.hxx"
 #include "rtl/string.h"
 #include "rtl/string.hxx"
@@ -52,7 +53,7 @@ private:
 
 } }
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(test::oustring::EndsWith, "alltest");
+CPPUNIT_TEST_SUITE_REGISTRATION(test::oustring::EndsWith);
 
 namespace {
 
diff --git a/sal/qa/rtl/strings/test_oustring_noadditional.cxx b/sal/qa/rtl/strings/test_oustring_noadditional.cxx
index 679b581..d5a1de5 100644
--- a/sal/qa/rtl/strings/test_oustring_noadditional.cxx
+++ b/sal/qa/rtl/strings/test_oustring_noadditional.cxx
@@ -29,8 +29,8 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sal.hxx"
 
-#include "testshl/simpleheader.hxx"
+#include <cppunit/plugin/TestPlugIn.h>
 
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx b/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx
index 172dda4..5f28954 100644
--- a/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx
+++ b/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx
@@ -29,7 +29,10 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sal.hxx"
 
-#include "testshl/simpleheader.hxx"
+#include <cppunit/TestFixture.h>
+#include <cppunit/TestAssert.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
 #include "rtl/ustrbuf.hxx"
 #include "rtl/ustring.h"
 #include "rtl/ustring.hxx"
@@ -50,7 +53,7 @@ private:
 
 } }
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(test::oustringbuffer::Utf32, "alltest");
+CPPUNIT_TEST_SUITE_REGISTRATION(test::oustringbuffer::Utf32);
 
 namespace {
 
@@ -99,13 +102,13 @@ void test::oustringbuffer::Utf32::appendUtf32() {
     rtl::OUString res1(buf1.makeStringAndClear());
     createMessage(message, res1, rtl::OUString(str2, str2Len));
     CPPUNIT_ASSERT_MESSAGE(
-        message.getStr(), res1 == rtl::OUString(str2, str2Len));
+        (const char *) message.getStr(), res1 == rtl::OUString(str2, str2Len));
     rtl::OUStringBuffer buf2(rtl::OUString(str2, str2Len));
     buf2.appendUtf32(0x10000);
     rtl::OUString res2(buf2.makeStringAndClear());
     createMessage(message, res2, rtl::OUString(str3, str3Len));
     CPPUNIT_ASSERT_MESSAGE(
-        message.getStr(), res2 == rtl::OUString(str3, str3Len));
+        (const char *)message.getStr(), res2 == rtl::OUString(str3, str3Len));
 }
 
 void test::oustringbuffer::Utf32::insertUtf32() {
@@ -121,13 +124,13 @@ void test::oustringbuffer::Utf32::insertUtf32() {
     rtl::OUString res1(buf1.makeStringAndClear());
     createMessage(message, res1, rtl::OUString(str2, str2Len));
     CPPUNIT_ASSERT_MESSAGE(
-        message.getStr(), res1 == rtl::OUString(str2, str2Len));
+        (const char *) message.getStr(), res1 == rtl::OUString(str2, str2Len));
     rtl::OUStringBuffer buf2(rtl::OUString(str2, str2Len));
     buf2.insertUtf32(2, 0x10FFFF);
     rtl::OUString res2(buf2.makeStringAndClear());
     createMessage(message, res2, rtl::OUString(str3, str3Len));
     CPPUNIT_ASSERT_MESSAGE(
-        message.getStr(), res2 == rtl::OUString(str3, str3Len));
+        (const char *) message.getStr(), res2 == rtl::OUString(str3, str3Len));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-- 
1.7.0.4


--=-Egpq4KBUxNa9QwXzo0J+
Content-Disposition: attachment; filename="0002-Removed-unnecessary-includes.patch"
Content-Type: text/x-patch; name="0002-Removed-unnecessary-includes.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



More information about the LibreOffice mailing list