summaryrefslogtreecommitdiff
path: root/sal/qa
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 19:49:53 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 20:03:42 +0200
commitd6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch)
treeb5a12df1fcae025715633469b75ab4c9b6f6d279 /sal/qa
parent0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'sal/qa')
-rw-r--r--sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx26
-rw-r--r--sal/qa/rtl/oustring/rtl_OUString2.cxx4
-rw-r--r--sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx6
3 files changed, 11 insertions, 25 deletions
diff --git a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
index b25fb1612f37..71aa8da979b2 100644
--- a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
+++ b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
@@ -678,18 +678,13 @@ namespace rtl_Bootstrap
void testRecursion() {
rtl::OUString t(RTL_CONSTASCII_USTRINGPARAM("$RECURSIVE"));
Bootstrap(t_getSourcePath(TESTSHL2_INI)).expandMacrosFrom(t);
- CPPUNIT_ASSERT_MESSAGE(
- "recursion detection",
- t.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("***RECURSION DETECTED***")));
+ CPPUNIT_ASSERT_MESSAGE( "recursion detection", t == "***RECURSION DETECTED***" );
}
void testLink() {
rtl::OUString t(RTL_CONSTASCII_USTRINGPARAM("$LINKED"));
Bootstrap(t_getSourcePath(TESTSHL2_INI)).expandMacrosFrom(t);
- CPPUNIT_ASSERT_MESSAGE(
- "link file",
- t.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("qadev17")));
+ CPPUNIT_ASSERT_MESSAGE( "link file", t == "qadev17");
}
void testOverride() {
@@ -697,16 +692,12 @@ namespace rtl_Bootstrap
RTL_CONSTASCII_USTRINGPARAM(
"${.override:$ORIGIN/" SAL_CONFIGFILE("rtl") ":ORIGIN}"));
Bootstrap(t_getSourcePath("rtl")).expandMacrosFrom(t1);
- CPPUNIT_ASSERT_MESSAGE(
- "override ORIGIN",
- t1.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("direct")));
+ CPPUNIT_ASSERT_MESSAGE( "override ORIGIN", t1 == "direct" );
rtl::OUString t2(
RTL_CONSTASCII_USTRINGPARAM(
"${.override:$ORIGIN/" SAL_CONFIGFILE("none") ":MYVAR}"));
Bootstrap::expandMacros(t2);
- CPPUNIT_ASSERT_MESSAGE(
- "override MYVAR",
- t2.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("src680_test")));
+ CPPUNIT_ASSERT_MESSAGE( "override MYVAR", t2 == "src680_test" );
}
void testNonexisting() {
@@ -714,9 +705,7 @@ namespace rtl_Bootstrap
RTL_CONSTASCII_USTRINGPARAM(
"${$ORIGIN/" SAL_CONFIGFILE("none") ":MYVAR}"));
Bootstrap::expandMacros(t);
- CPPUNIT_ASSERT_MESSAGE(
- "nonexisting",
- t.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("src680_test")));
+ CPPUNIT_ASSERT_MESSAGE( "nonexisting", t == "src680_test" );
}
void testSection() {
@@ -732,10 +721,7 @@ namespace rtl_Bootstrap
b.appendAscii(RTL_CONSTASCII_STRINGPARAM(":Other_Section:EXPAND}"));
rtl::OUString t(b.makeStringAndClear());
Bootstrap(t_getSourcePath(TESTSHL2_INI)).expandMacrosFrom(t);
- CPPUNIT_ASSERT_MESSAGE(
- "section expansion",
- t.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("$FILE")));
+ CPPUNIT_ASSERT_MESSAGE( "section expansion", t == "$FILE" );
// the correct answer would be "testshl2 file" instead, but
// expansion including a section currently erroneously does not
// recursively expand macros in the resulting replacement text
diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx
index 5d4953e040f3..37711cf0dad4 100644
--- a/sal/qa/rtl/oustring/rtl_OUString2.cxx
+++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx
@@ -1022,7 +1022,7 @@ public:
::rtl::OUString aFoo( RTL_CONSTASCII_USTRINGPARAM("foo") );
::rtl::OUString aFooIntern = aFoo.intern();
- CPPUNIT_ASSERT_MESSAGE("string contents", aFooIntern.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("foo")));
+ CPPUNIT_ASSERT_MESSAGE( "string contents", aFooIntern == "foo" );
CPPUNIT_ASSERT_MESSAGE("string length", aFooIntern.getLength() == 3);
// We have to dup due to no atomic 'intern' bit-set operation
CPPUNIT_ASSERT_MESSAGE("intern dups", aFoo.pData != aFooIntern.pData);
@@ -1246,7 +1246,7 @@ void convertFromString::test() {
(RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR |
RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR |
RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)));
- CPPUNIT_ASSERT(t.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("abc")));
+ CPPUNIT_ASSERT( t == "abc" );
}
// -----------------------------------------------------------------------------
diff --git a/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx b/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx
index 454bba9254c6..ae402bb0d911 100644
--- a/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx
+++ b/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx
@@ -53,12 +53,12 @@ CPPUNIT_TEST_SUITE_REGISTRATION(test::oustringbuffer::ToString);
void test::oustringbuffer::ToString::testToString() {
rtl::OUStringBuffer sb(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test string")));
rtl::OUString str = sb.toString();
- CPPUNIT_ASSERT(str.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test string")));
+ CPPUNIT_ASSERT( str == "test string" );
// returned OUString must be independent from sb
sb.append( (sal_Unicode)'a' );
- CPPUNIT_ASSERT(str.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test string")));
+ CPPUNIT_ASSERT( str == "test string" );
sb.setLength(0);
- CPPUNIT_ASSERT(str.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test string")));
+ CPPUNIT_ASSERT( str == "test string" );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */