diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-09-20 07:43:07 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-09-20 07:43:07 +0000 |
commit | 05827f1cc881c05c6e300fb13232e257c3e6ed8f (patch) | |
tree | 23a48df8127ff529e914b1e37a8cc7aff5e2bc58 /sal/qa/rtl/oustring | |
parent | 237f5ef6a7d998e2fcfa79a35b22a8e801ba7e3d (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/oustring')
-rw-r--r-- | sal/qa/rtl/oustring/rtl_OUString2.cxx | 10 |
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 fcc6e0500948..709928ecc4da 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 |