summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/tests/kopeteemoticontest.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/libkopete/tests/kopeteemoticontest.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/libkopete/tests/kopeteemoticontest.cpp')
-rw-r--r--kopete/libkopete/tests/kopeteemoticontest.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kopete/libkopete/tests/kopeteemoticontest.cpp b/kopete/libkopete/tests/kopeteemoticontest.cpp
index e9a81c1d..a64aee99 100644
--- a/kopete/libkopete/tests/kopeteemoticontest.cpp
+++ b/kopete/libkopete/tests/kopeteemoticontest.cpp
@@ -18,9 +18,9 @@
#include <stdlib.h>
-#include <qstring.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -51,7 +51,7 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopeteEmoticonTest );
void KopeteEmoticonTest::allTests()
{
// change user data dir to avoid messing with user's .kde dir
- setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true );
+ setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true );
//KApplication::disableAutoDcopRegistration();
//KApplication app;
@@ -62,19 +62,19 @@ void KopeteEmoticonTest::allTests()
void KopeteEmoticonTest::testEmoticonParser()
{
Kopete::Emoticons emo("Default");
- QString basePath = QString::fromLatin1( SRCDIR ) + QString::fromLatin1("/emoticon-parser-testcases");
- QDir testCasesDir(basePath);
+ TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/emoticon-parser-testcases");
+ TQDir testCasesDir(basePath);
- QStringList inputFileNames = testCasesDir.entryList("*.input");
- for ( QStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it)
+ TQStringList inputFileNames = testCasesDir.entryList("*.input");
+ for ( TQStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it)
{
- QString fileName = *it;
+ TQString fileName = *it;
kdDebug() << "testcase: " << fileName << endl;
- QString outputFileName = fileName;
+ TQString outputFileName = fileName;
outputFileName.replace("input","output");
// open the input file
- QFile inputFile(basePath + QString::fromLatin1("/") + fileName);
- QFile expectedFile(basePath + QString::fromLatin1("/") + outputFileName);
+ TQFile inputFile(basePath + TQString::fromLatin1("/") + fileName);
+ TQFile expectedFile(basePath + TQString::fromLatin1("/") + outputFileName);
// check if the expected output file exists
// if it doesn't, skip the testcase
if ( ! expectedFile.exists() )
@@ -84,29 +84,29 @@ void KopeteEmoticonTest::testEmoticonParser()
}
if ( inputFile.open( IO_ReadOnly ) && expectedFile.open( IO_ReadOnly ))
{
- QTextStream inputStream(&inputFile);
- QTextStream expectedStream(&expectedFile);
- QString inputData;
- QString expectedData;
+ TQTextStream inputStream(&inputFile);
+ TQTextStream expectedStream(&expectedFile);
+ TQString inputData;
+ TQString expectedData;
inputData = inputStream.read();
expectedData = expectedStream.read();
inputFile.close();
expectedFile.close();
- QString path = KGlobal::dirs()->findResource( "emoticons", "Default/smile.png" ).replace( "smile.png", QString::null );
+ TQString path = KGlobal::dirs()->findResource( "emoticons", "Default/smile.png" ).replace( "smile.png", TQString::null );
Kopete::Emoticons::self();
- QString result = emo.parse( inputData ).replace( path, QString::null );
+ TQString result = emo.parse( inputData ).replace( path, TQString::null );
// 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 + QString::fromLatin1(": ") + result;
- expectedData = fileName + QString::fromLatin1(": ") + expectedData;
+ result = fileName + TQString::fromLatin1(": ") + result;
+ expectedData = fileName + TQString::fromLatin1(": ") + expectedData;
// if the test case begins with broken, we expect it to fail, then use XFAIL
// otherwise use CHECK
- if ( fileName.section("-", 0, 0) == QString::fromLatin1("broken") )
+ if ( fileName.section("-", 0, 0) == TQString::fromLatin1("broken") )
{
kdDebug() << "checking known-broken testcase: " << fileName << endl;
XFAIL(result, expectedData);