Attached please find some changes to make tests in ure/sal work. One test fails and breaks the build though - if this is unwanted you may revert the change to ure/sal/prj/build.lst. (This is not exactly what is intended by tests - i mean to switch it off if it fails, but in the Moment I don't know how to repair the failing method so that it works as intended by the test.)
This is LGPLv3+/MPL. So long.
>From c2ea7912df3e7fd2e05b5babe7533f7413f77596 Mon Sep 17 00:00:00 2001 From: Wilhelm Pflueger <wilhelm.pflue...@web.de> Date: Sat, 5 Feb 2011 22:31:57 +0100 Subject: [PATCH 1/2] Re-animated tests that were based on testshl. 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
>From e21d6109516e2834bcea17301420e8e2bb22a313 Mon Sep 17 00:00:00 2001 From: Wilhelm Pflueger <wilhelm.pflue...@web.de> Date: Sat, 5 Feb 2011 23:36:31 +0100 Subject: [PATCH 2/2] Removed unnecessary includes --- sal/qa/rtl/strings/test_oustring_compare.cxx | 1 - sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx | 1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/sal/qa/rtl/strings/test_oustring_compare.cxx b/sal/qa/rtl/strings/test_oustring_compare.cxx index bb28cf4..493d80e 100644 --- a/sal/qa/rtl/strings/test_oustring_compare.cxx +++ b/sal/qa/rtl/strings/test_oustring_compare.cxx @@ -31,7 +31,6 @@ #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> -//#include <cppunit/plugin/TestPlugIn.h> #include "rtl/string.h" #include "rtl/ustring.hxx" diff --git a/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx b/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx index 5f28954..0c94f4c 100644 --- a/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx +++ b/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx @@ -32,7 +32,6 @@ #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" -- 1.7.0.4
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice