diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kmail/tests/utiltests.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/tests/utiltests.cpp')
-rw-r--r-- | kmail/tests/utiltests.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kmail/tests/utiltests.cpp b/kmail/tests/utiltests.cpp index 195758b87..ec6c13543 100644 --- a/kmail/tests/utiltests.cpp +++ b/kmail/tests/utiltests.cpp @@ -49,7 +49,7 @@ void UtilTester::test_lf2crlf() COMPARE( KMail::Util::lf2crlf( TQCString("") ), TQCString("") ); // TQByteArray version - TQByteArray arr; KMail::Util::setFromQCString( arr, src ); + TQByteArray arr; KMail::Util::setFromTQCString( arr, src ); COMPARE( arr[arr.size()-1], '\r' ); TQByteArray arrConv = KMail::Util::lf2crlf( arr ); COMPARE( arrConv[arrConv.size()-1], '\r' ); @@ -81,14 +81,14 @@ void UtilTester::test_append() TQCString test; TQCString str = "foo"; COMPARE( (int)str.size(), 4 ); // trailing nul included - TQByteArray s1 = KMail::Util::byteArrayFromQCStringNoDetach( str ); + TQByteArray s1 = KMail::Util::byteArrayFromTQCStringNoDetach( str ); COMPARE( (int)s1.size(), 3 ); COMPARE( (int)str.size(), 3 ); // trailing nul got removed COMPARE( s1.data(), str.data() ); // yes, no detach COMPARE( s1[2], 'o' ); TQCString bar( "bar" ); - TQByteArray s2 = KMail::Util::byteArrayFromQCStringNoDetach( bar ); + TQByteArray s2 = KMail::Util::byteArrayFromTQCStringNoDetach( bar ); COMPARE( (int)s2.size(), 3 ); KMail::Util::append( s1, s2 ); @@ -123,7 +123,7 @@ void UtilTester::test_insert() TQCString str = "foo"; COMPARE( (int)str.size(), 4 ); // trailing nul included TQByteArray s1; - KMail::Util::setFromQCString( s1, str ); + KMail::Util::setFromTQCString( s1, str ); KMail::Util::insert( s1, 1, "bar" ); COMPARE( (int)s1.size(), 6 ); @@ -140,7 +140,7 @@ void UtilTester::test_insert() void UtilTester::test_DwStringConversions( const TQCString& cstr ) { - // QCString->DwString->QCString + // TQCString->DwString->TQCString COMPARE( (int)cstr.size(), 8 ); DwString dwstr = KMail::Util::dwString( cstr ); COMPARE( (int)dwstr.size(), 7 ); @@ -150,16 +150,16 @@ void UtilTester::test_DwStringConversions( const TQCString& cstr ) COMPARE( cstr2, cstr ); COMPARE( cstr2[6], 'r' ); - // And also QCString->QByteArray + // And also TQCString->TQByteArray TQByteArray arr; - KMail::Util::setFromQCString( arr, cstr ); + KMail::Util::setFromTQCString( arr, cstr ); COMPARE( (int)arr.size(), 7 ); COMPARE( arr[6], 'r' ); - KMail::Util::setFromQCString( arr, TQCString() ); + KMail::Util::setFromTQCString( arr, TQCString() ); COMPARE( (int)arr.size(), 0 ); - // DwString->QByteArray + // DwString->TQByteArray TQByteArray ba = KMail::Util::ByteArray( dwstr ); COMPARE( (int)ba.size(), 7 ); COMPARE( ba[6], 'r' ); @@ -186,17 +186,17 @@ void UtilTester::test_DwStringConversions() VERIFY( dwstr.empty() ); } -void UtilTester::test_QByteArrayQCString() +void UtilTester::test_TQByteArrayTQCString() { TQCString str = "foobar"; COMPARE( (int)str.size(), 7 ); // trailing nul included - TQByteArray s1 = KMail::Util::byteArrayFromQCStringNoDetach( str ); + TQByteArray s1 = KMail::Util::byteArrayFromTQCStringNoDetach( str ); COMPARE( (int)str.size(), 6 ); // trailing nul got removed COMPARE( s1.data(), str.data() ); // yes, no detach COMPARE( s1[5], 'r' ); COMPARE( str[5], 'r' ); - KMail::Util::restoreQCString( str ); + KMail::Util::restoreTQCString( str ); COMPARE( (int)str.size(), 7 ); // trailing nul included COMPARE( str[5], 'r' ); COMPARE( str[6], '\0' ); |