diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-09 17:22:11 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-09 20:32:39 +0100 |
commit | a2454a42ad2236f0f6b88be166bc7e6a8f90f036 (patch) | |
tree | 7f6dfc38cfd617f41c63a17640ec7ef8650a2c45 /sal | |
parent | eba2ef9504fe4034cbb44840d459d82ab8a141b1 (diff) |
fdo#43460: use isEmpty()
Change-Id: I01f503ea5268245cc4f98524931730cfa063d57e
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/OStringBuffer/rtl_OStringBuffer.cxx | 8 | ||||
-rw-r--r-- | sal/qa/rtl/ostring/rtl_OString2.cxx | 4 | ||||
-rw-r--r-- | sal/qa/rtl/oustring/rtl_OUString2.cxx | 6 | ||||
-rw-r--r-- | sal/qa/rtl_strings/rtl_OUStringBuffer.cxx | 10 | ||||
-rw-r--r-- | sal/qa/rtl_strings/rtl_old_testowstring.cxx | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx index 18fab173e701..ca5274dc1900 100644 --- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx +++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx @@ -52,7 +52,7 @@ namespace rtl_OStringBuffer CPPUNIT_ASSERT_MESSAGE ( "New OStringBuffer containing no characters", - aStrBuf.getLength() == 0 && + aStrBuf.isEmpty() && *pStr == '\0' && aStrBuf.getCapacity() == 16 ); } @@ -90,10 +90,10 @@ namespace rtl_OStringBuffer CPPUNIT_ASSERT_MESSAGE ( "New OStringBuffer containing no characters and contain assigned capacity", - aStrBuf1.getLength() == 0 && + aStrBuf1.isEmpty() && *pStr1 == '\0' && aStrBuf1.getCapacity() == kTestStr2Len && - aStrBuf2.getLength() == 0 && + aStrBuf2.isEmpty() && *pStr2 == '\0' && aStrBuf2.getCapacity() == 0 ); @@ -111,7 +111,7 @@ namespace rtl_OStringBuffer CPPUNIT_ASSERT_MESSAGE ( "New OStringBuffer containing no characters and contain assigned capacity", - aStrBuf3.getLength() == 0 && + aStrBuf3.isEmpty() && *pStr == '\0' && aStrBuf3.getCapacity() == kNonSInt32Max ); diff --git a/sal/qa/rtl/ostring/rtl_OString2.cxx b/sal/qa/rtl/ostring/rtl_OString2.cxx index 6826fb944d37..0ea73cdcbd43 100644 --- a/sal/qa/rtl/ostring/rtl_OString2.cxx +++ b/sal/qa/rtl/ostring/rtl_OString2.cxx @@ -425,7 +425,7 @@ public: CPPUNIT_ASSERT_MESSAGE("Token should be a 'a'", sToken.equals("a") == sal_True); /* rtl::OString */ sToken = sTokenStr.getToken( 0, ';', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be empty", sToken.getLength() == 0); + CPPUNIT_ASSERT_MESSAGE("Token should be empty", sToken.isEmpty()); /* rtl::OString */ sToken = sTokenStr.getToken( 0, ';', nIndex ); CPPUNIT_ASSERT_MESSAGE("Token should be a 'b'", sToken.equals("b") == sal_True); @@ -448,7 +448,7 @@ public: CPPUNIT_ASSERT_MESSAGE("Token should be 'ever'", sToken.equals("ever") == sal_True); /* rtl::OString */ sToken = sTokenStr.getToken( 0, '.', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be empty", sToken.getLength() == 0); + CPPUNIT_ASSERT_MESSAGE("Token should be empty", sToken.isEmpty()); CPPUNIT_ASSERT_MESSAGE("index should be negative", nIndex == -1); } diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx index 331016ed586d..ad1c6180ab4e 100644 --- a/sal/qa/rtl/oustring/rtl_OUString2.cxx +++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx @@ -914,7 +914,7 @@ public: CPPUNIT_ASSERT_MESSAGE( "Token should be a 'a'", suToken == "a" ); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, ';', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be empty", suToken.getLength() == 0); + CPPUNIT_ASSERT_MESSAGE("Token should be empty", suToken.isEmpty()); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, ';', nIndex ); CPPUNIT_ASSERT_MESSAGE( "Token should be a 'b'", suToken == "b" ); @@ -937,7 +937,7 @@ public: CPPUNIT_ASSERT_MESSAGE( "Token should be 'ever'", suToken == "ever" ); /* rtl::OUString */ suToken = suTokenStr.getToken( 0, '.', nIndex ); - CPPUNIT_ASSERT_MESSAGE("Token should be empty", suToken.getLength() == 0); + CPPUNIT_ASSERT_MESSAGE("Token should be empty", suToken.isEmpty()); CPPUNIT_ASSERT_MESSAGE("index should be negative", nIndex == -1); } @@ -949,7 +949,7 @@ public: "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); + "token should be empty", ab.getToken(0, '-', n).isEmpty()); } CPPUNIT_TEST_SUITE(getToken); diff --git a/sal/qa/rtl_strings/rtl_OUStringBuffer.cxx b/sal/qa/rtl_strings/rtl_OUStringBuffer.cxx index 9a1233e2efa0..56d8926662c5 100644 --- a/sal/qa/rtl_strings/rtl_OUStringBuffer.cxx +++ b/sal/qa/rtl_strings/rtl_OUStringBuffer.cxx @@ -63,13 +63,13 @@ static sal_Bool test_rtl_OUStringBuffer_ctor_001( hTestResult hRtlTestResult ) ::rtl::OUStringBuffer aUStrBuf; bool b1 = - aUStrBuf.getLength() == 0 && + aUStrBuf.isEmpty() && ! *(aUStrBuf.getStr()) && aUStrBuf.getCapacity() == 16; ::rtl::OUStringBuffer aUStrBuf2(0); bool b2 = - aUStrBuf2.getLength() == 0 && + aUStrBuf2.isEmpty() && ! *(aUStrBuf2.getStr()) && aUStrBuf2.getCapacity() == /* LLA: !!! */ 0; return @@ -116,15 +116,15 @@ sal_Bool SAL_CALL test_rtl_OUStringBuffer_ctor_003( bool b1 = - aUStrBuf1.getLength() == 0 && + aUStrBuf1.isEmpty() && ! *(aUStrBuf1.getStr()) && aUStrBuf1.getCapacity() == kTestStr2Len ; bool b2 = - aUStrBuf2.getLength() == 0 && + aUStrBuf2.isEmpty() && ! *(aUStrBuf2.getStr()) && aUStrBuf2.getCapacity() == /* LLA: ??? 16 */ 0; bool b3 = - aUStrBuf3.getLength() == 0 && + aUStrBuf3.isEmpty() && ! *(aUStrBuf3.getStr()) && aUStrBuf3.getCapacity() == kNonSInt32Max; return diff --git a/sal/qa/rtl_strings/rtl_old_testowstring.cxx b/sal/qa/rtl_strings/rtl_old_testowstring.cxx index 92a0e143b138..f23287a5a25b 100644 --- a/sal/qa/rtl_strings/rtl_old_testowstring.cxx +++ b/sal/qa/rtl_strings/rtl_old_testowstring.cxx @@ -167,7 +167,7 @@ void oldtests::test_OUString() //YD will fail copy assert on indexes, because ':' returns -1 s7 = OUString("Hallo jetzt komm ich"); s8 = s7.copy(0, s7.indexOf((sal_Unicode)':')); - TEST_ENSURE( s8.getLength() == 0, "test_OWString error 55"); + TEST_ENSURE( s8.isEmpty(), "test_OWString error 55"); TEST_ENSURE( s8.compareTo(OUString()) == 0, "test_OWString error 56"); #endif |