[Libreoffice-commits] .: 2 commits - sal/qa

Caolán McNamara caolan at kemper.freedesktop.org
Tue Feb 8 02:22:53 PST 2011


 sal/qa/rtl/strings/test_oustring_convert.cxx     |   10 ++++------
 sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx |    8 ++++----
 2 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 5b111d62b0dd0fe43ffe2382b83d126b848cb35a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Feb 7 11:27:04 2011 +0000

    Reflect the changes of 66b035b10d7d1803692056c8aca11e23095322e3 into the tests
    
    i.e. "#98452# When converting from Unicode to ISO-2022-JP, assume the initial
    state is ASCII and do not write any unnecessary <ESC> ( B sequences to
    initially switch to ASCII", so we need to modify the test to take this
    into account

diff --git a/sal/qa/rtl/strings/test_oustring_convert.cxx b/sal/qa/rtl/strings/test_oustring_convert.cxx
index 6b7bc7a..385081f 100644
--- a/sal/qa/rtl/strings/test_oustring_convert.cxx
+++ b/sal/qa/rtl/strings/test_oustring_convert.cxx
@@ -164,14 +164,12 @@ void test::oustring::Convert::convertToString()
                   | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR,
               0,
               "" },
-            // the next also tests that a short source produces a long target:
-            /* FIXME: fails currently
-            { { 0xB800 },
-              1,
+            { { 0x3001,  0xB800 },
+              2,
               RTL_TEXTENCODING_ISO_2022_JP,
               OUSTRING_TO_OSTRING_CVTFLAGS,
-              "\x1B(B?",
-              "\x1B(B?" }, */
+              "\x1b\x24\x42\x21\x22\x1b\x28\x42\x3f",
+              "\x1b\x24\x42\x21\x22\x1b\x28\x42\x3f" },
             { { 0x0041,0x0100,0x0042 },
               3,
               RTL_TEXTENCODING_ISO_8859_1,
commit 48c1e72d2ebeb2e00573633204c348ea2be2ab9e
Author: Wilhelm Pflueger <Wilhelm.Pflueger at web.de>
Date:   Sat Feb 5 22:31:57 2011 +0100

    Re-animated tests that were based on testshl.
    
    One test in test_outstring_convert.cxx fails for method
    rtl::OUString::convertToString().

diff --git a/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx b/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx
index 8b6111e..846fc35 100644
--- a/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx
+++ b/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx
@@ -104,13 +104,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() {
@@ -126,13 +126,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: */


More information about the Libreoffice-commits mailing list