diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-11-28 13:32:31 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-28 15:02:06 +0100 |
commit | 6676c4ebbd264448e1d7871c91c1b3ba72c0dda0 (patch) | |
tree | 3589454140bd251862697da604b7bf1311c80373 /sal/qa | |
parent | 47dfe5b8fd4abf9b5cb3c52db4ea6f4af6ea6b9c (diff) |
Fix rtl::OUString::compareToIgnoreAsciiCase
Change-Id: I40005ef4fad4d44314ec2fb2881fec82e926970e
Diffstat (limited to 'sal/qa')
-rw-r--r-- | sal/qa/rtl/strings/test_oustring_compare.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sal/qa/rtl/strings/test_oustring_compare.cxx b/sal/qa/rtl/strings/test_oustring_compare.cxx index c41c2238243e..8b506b78d728 100644 --- a/sal/qa/rtl/strings/test_oustring_compare.cxx +++ b/sal/qa/rtl/strings/test_oustring_compare.cxx @@ -32,9 +32,12 @@ private: void compareToAscii(); + void compareToIgnoreAsciiCase(); + CPPUNIT_TEST_SUITE(Compare); CPPUNIT_TEST(equalsIgnoreAsciiCaseAscii); CPPUNIT_TEST(compareToAscii); +CPPUNIT_TEST(compareToIgnoreAsciiCase); CPPUNIT_TEST_SUITE_END(); }; @@ -70,4 +73,16 @@ void test::oustring::Compare::compareToAscii() sal_Int32(0), abc.compareToAscii(RTL_CONSTASCII_STRINGPARAM("a"))); } +void test::oustring::Compare::compareToIgnoreAsciiCase() +{ + CPPUNIT_ASSERT_EQUAL( + sal_Int32(0), + rtl::OUString("abc").compareToIgnoreAsciiCase(rtl::OUString("ABC"))); + CPPUNIT_ASSERT( + rtl::OUString("ABC").compareToIgnoreAsciiCase(rtl::OUString("abcdef")) + < 0); + CPPUNIT_ASSERT( + rtl::OUString("A").compareToIgnoreAsciiCase(rtl::OUString("_")) > 0); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |