summaryrefslogtreecommitdiff
path: root/sal/qa/rtl
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-09-20 07:43:07 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-09-20 07:43:07 +0000
commit2f034397132ad8eeb53d8ffe742fe0c4a73bf633 (patch)
treeebdb2ed3bdd0b3361b01633b0fb31e11a44fe9ec /sal/qa/rtl
parent073415eccc96f327923c9fed6344746f9af22e1c (diff)
INTEGRATION: CWS ause011 (1.4.52); FILE MERGED
2004/08/18 11:47:53 sb 1.4.52.1: #i33153# Made getToken more robust.
Diffstat (limited to 'sal/qa/rtl')
-rw-r--r--sal/qa/rtl/oustring/rtl_OUString2.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx
index e639c29d4..5c292e6f4 100644
--- a/sal/qa/rtl/oustring/rtl_OUString2.cxx
+++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx
@@ -802,6 +802,15 @@ public:
CPPUNIT_ASSERT_MESSAGE("index should be negative", nIndex == -1);
}
+ void getToken_005() {
+ rtl::OUString ab(RTL_CONSTASCII_USTRINGPARAM("ab"));
+ sal_Int32 n = 0;
+ CPPUNIT_ASSERT_MESSAGE(
+ "token should be 'ab'", ab.getToken(0, '-', n) == ab);
+ CPPUNIT_ASSERT_MESSAGE("n should be -1", n == -1);
+ CPPUNIT_ASSERT_MESSAGE(
+ "token should be empty", ab.getToken(0, '-', n).getLength() == 0);
+ }
CPPUNIT_TEST_SUITE(getToken);
CPPUNIT_TEST(getToken_000);
@@ -809,6 +818,7 @@ public:
CPPUNIT_TEST(getToken_002);
CPPUNIT_TEST(getToken_003);
CPPUNIT_TEST(getToken_004);
+ CPPUNIT_TEST(getToken_005);
CPPUNIT_TEST_SUITE_END();
}; // class getToken