summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/tests/kopetemessage_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/libkopete/tests/kopetemessage_test.cpp')
-rw-r--r--kopete/libkopete/tests/kopetemessage_test.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kopete/libkopete/tests/kopetemessage_test.cpp b/kopete/libkopete/tests/kopetemessage_test.cpp
index 3e4a85b3..55a44f87 100644
--- a/kopete/libkopete/tests/kopetemessage_test.cpp
+++ b/kopete/libkopete/tests/kopetemessage_test.cpp
@@ -29,11 +29,11 @@
#include <kdebug.h>
#include "kopetemessage_test.h"
-#include "kopeteaccount_mock.h"
-#include "kopeteprotocol_mock.h"
-#include "kopetecontact_mock.h"
-#include "kopetemetacontact_mock.h"
-#include "kopeteaccount_mock.h"
+#include "kopeteaccount_tqmock.h"
+#include "kopeteprotocol_tqmock.h"
+#include "kopetecontact_tqmock.h"
+#include "kopetemetacontact_tqmock.h"
+#include "kopeteaccount_tqmock.h"
using namespace KUnitTest;
@@ -57,9 +57,9 @@ KopeteMessage_Test::KopeteMessage_Test()
m_account = new Kopete::Test::Mock::Account(m_protocol, "testaccount");
m_metaContactMyself = new Kopete::Test::Mock::MetaContact();
m_metaContactOther = new Kopete::Test::Mock::MetaContact();
- m_contactFrom = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-myself"), m_metaContactMyself, TQString::null);
- m_contactTo = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-dest"), m_metaContactOther, TQString::null);
- m_message = new Kopete::Message( m_contactFrom, m_contactTo, TQString::null, Kopete::Message::Outbound, Kopete::Message::PlainText);
+ m_contactFrom = new Kopete::Test::Mock::Contact(m_account, TQString::tqfromLatin1("test-myself"), m_metaContactMyself, TQString());
+ m_contactTo = new Kopete::Test::Mock::Contact(m_account, TQString::tqfromLatin1("test-dest"), m_metaContactOther, TQString());
+ m_message = new Kopete::Message( m_contactFrom, m_contactTo, TQString(), Kopete::Message::Outbound, Kopete::Message::PlainText);
}
void KopeteMessage_Test::allTests()
@@ -67,7 +67,7 @@ void KopeteMessage_Test::allTests()
KApplication::disableAutoDcopRegistration();
//KCmdLineArgs::init(argc,argv,"testkopetemessage", 0, 0, 0, 0);
- // At least Kopete::Message::asXML() seems to require that a QApplication
+ // At least Kopete::Message::asXML() seems to require that a TQApplication
// is created. Running the console version doesn't create it, but the GUI
// version does.
@@ -227,7 +227,7 @@ void KopeteMessage_Test::testPrimitives()
{
Kopete::Message msg2;
- CHECK(msg2.plainBody(), TQString::null);
+ CHECK(msg2.plainBody(), TQString());
msg2 = msg1;
@@ -251,7 +251,7 @@ void KopeteMessage_Test::setup()
void KopeteMessage_Test::testLinkParser()
{
- TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/link-parser-testcases");
+ TQString basePath = TQString::tqfromLatin1( SRCDIR ) + TQString::tqfromLatin1("/link-parser-testcases");
TQDir testCasesDir(basePath);
TQStringList inputFileNames = testCasesDir.entryList("*.input");
@@ -259,10 +259,10 @@ void KopeteMessage_Test::testLinkParser()
{
TQString fileName = *it;
TQString outputFileName = fileName;
- outputFileName.replace("input","output");
+ outputFileName.tqreplace("input","output");
// open the input file
- TQFile inputFile(basePath + TQString::fromLatin1("/") + fileName);
- TQFile expectedFile(basePath + TQString::fromLatin1("/") + outputFileName);
+ TQFile inputFile(basePath + TQString::tqfromLatin1("/") + fileName);
+ TQFile expectedFile(basePath + TQString::tqfromLatin1("/") + outputFileName);
// check if the expected output file exists
// if it doesn't, skip the testcase
if ( ! expectedFile.exists() )
@@ -283,12 +283,12 @@ void KopeteMessage_Test::testLinkParser()
expectedFile.close();
// use a concrete url
- inputData.replace( "$URL","http://www.kde.org" );
- expectedData.replace( "$URL","http://www.kde.org" );
+ inputData.tqreplace( "$URL","http://www.kde.org" );
+ expectedData.tqreplace( "$URL","http://www.kde.org" );
// set message format for parsing according to textcase filename convention
Kopete::Message::MessageFormat format;
- if ( fileName.section("-", 1, 1) == TQString::fromLatin1("plaintext") )
+ if ( fileName.section("-", 1, 1) == TQString::tqfromLatin1("plaintext") )
format = Kopete::Message::PlainText;
else
format = Kopete::Message::RichText;
@@ -298,11 +298,11 @@ void KopeteMessage_Test::testLinkParser()
// HACK to know the test case we applied, concatenate testcase name to both
// input and expected string. WIll remove when I can add some sort of metadata
// to a CHECK so debug its origin testcase
- result = fileName + TQString::fromLatin1(": ") + result;
- expectedData = fileName + TQString::fromLatin1(": ") + expectedData;
+ result = fileName + TQString::tqfromLatin1(": ") + result;
+ expectedData = fileName + TQString::tqfromLatin1(": ") + expectedData;
// if the test case begins with broken, we expect it to fail, then use XFAIL
// otherwise use CHECK
- if ( fileName.section("-", 0, 0) == TQString::fromLatin1("broken") )
+ if ( fileName.section("-", 0, 0) == TQString::tqfromLatin1("broken") )
{
//kdDebug() << "checking known-broken testcase: " << fileName << endl;
XFAIL(result, expectedData);