diff options
Diffstat (limited to 'sal/qa')
-rw-r--r-- | sal/qa/rtl/strings/test_ostring_stringliterals.cxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx index 0ada7097221b..4af152c4f7c7 100644 --- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx +++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx @@ -149,20 +149,48 @@ void test::ostring::StringLiterals::checkUsage() rtl_string_unittest_const_literal = false; // start checking for OString conversions rtl_string_unittest_non_const_literal_function = false; // and check for non-const variants + rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT_EQUAL( foo, rtl::OString() = "foo" ); + CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); + rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT( FoO.equalsIgnoreAsciiCase( "fOo" )); + CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); + rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT( foobarfoo.match( "bar", 3 )); + CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); + rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT( foobar.match( "foo" )); + CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); + rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT( FooBaRfoo.matchIgnoreAsciiCase( "bAr", 3 )); + CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); + rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT( FooBaR.matchIgnoreAsciiCase( "fOo" )); + CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); + rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT( foobar.endsWith( "bar" )); + CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); +// rtl_string_unittest_const_literal_function = false; // CPPUNIT_ASSERT( FooBaR.endsWithIgnoreAsciiCase( "bar" )); +// CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); + rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT( foo == "foo" ); + CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); + rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT( "foo" == foo ); + CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); + rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT( foo != "bar" ); + CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); + rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT( "foo" != bar ); + CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); + rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT( foobarfoo.indexOf( "foo", 1 ) == 6 ); + CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); +// rtl_string_unittest_const_literal_function = false; // CPPUNIT_ASSERT( foobarfoo.lastIndexOf( "foo" ) == 6 ); +// CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); // if this is not true, some of the calls above converted to OString CPPUNIT_ASSERT( rtl_string_unittest_const_literal == false ); // if this is not true, some of the calls above used non-const variants |