summaryrefslogtreecommitdiffstats
path: root/libksieve/tests
diff options
context:
space:
mode:
Diffstat (limited to 'libksieve/tests')
-rw-r--r--libksieve/tests/lexertest.cpp10
-rw-r--r--libksieve/tests/parsertest.cpp46
2 files changed, 28 insertions, 28 deletions
diff --git a/libksieve/tests/lexertest.cpp b/libksieve/tests/lexertest.cpp
index 461499501..23e0f886d 100644
--- a/libksieve/tests/lexertest.cpp
+++ b/libksieve/tests/lexertest.cpp
@@ -36,8 +36,8 @@ using KSieve::Lexer;
#include <ksieve/error.h>
using KSieve::Error;
-#include <qcstring.h> // qstrlen
-#include <qstring.h>
+#include <tqcstring.h> // qstrlen
+#include <tqstring.h>
#include <iostream>
using std::cout;
@@ -403,7 +403,7 @@ int main( int argc, char * argv[] ) {
cout << "Begin" << endl;
while ( !lexer.atEnd() ) {
- QString result;
+ TQString result;
Lexer::Token token = lexer.nextToken( result );
if ( lexer.error() ) {
cout << "Error " << token2string( token ) << ": \""
@@ -427,7 +427,7 @@ int main( int argc, char * argv[] ) {
Lexer lexer( t.string, send, Lexer::IncludeComments );
cerr << t.name << ":";
for ( int j = 0 ; !lexer.atEnd() ; ++j ) {
- QString result;
+ TQString result;
Lexer::Token token = lexer.nextToken( result );
Error error = lexer.error();
if ( t.expected[j].token != token ) {
@@ -435,7 +435,7 @@ int main( int argc, char * argv[] ) {
cerr << " expected token " << token2string( t.expected[j].token )
<< ", got " << token2string( token );
}
- if ( QString::fromUtf8( t.expected[j].result ) != result ) {
+ if ( TQString::fromUtf8( t.expected[j].result ) != result ) {
ok = false;
if ( t.expected[j].result )
cerr << " expected string \"" << t.expected[j].result << "\"";
diff --git a/libksieve/tests/parsertest.cpp b/libksieve/tests/parsertest.cpp
index e2ea0fd39..87381a326 100644
--- a/libksieve/tests/parsertest.cpp
+++ b/libksieve/tests/parsertest.cpp
@@ -36,8 +36,8 @@ using KSieve::Parser;
#include <ksieve/error.h>
#include <ksieve/scriptbuilder.h>
-#include <qcstring.h> // qstrlen
-#include <qstring.h>
+#include <tqcstring.h> // qstrlen
+#include <tqstring.h>
#include <iostream>
using std::cout;
@@ -389,17 +389,17 @@ public:
}
virtual ~PrintingScriptBuilder() {}
- void taggedArgument( const QString & tag ) {
+ void taggedArgument( const TQString & tag ) {
write( "tag", tag );
}
- void stringArgument( const QString & string, bool multiLine, const QString & /*fixme*/ ) {
+ void stringArgument( const TQString & string, bool multiLine, const TQString & /*fixme*/ ) {
write( multiLine ? "string type=\"multiline\"" : "string type=\"quoted\"", string );
}
void numberArgument( unsigned long number, char quantifier ) {
- const QString txt = "number" + ( quantifier ? QString(" quantifier=\"%1\"").arg( quantifier ) : QString::null ) ;
- write( txt.latin1(), QString::number( number ) );
+ const TQString txt = "number" + ( quantifier ? TQString(" quantifier=\"%1\"").arg( quantifier ) : TQString::null ) ;
+ write( txt.latin1(), TQString::number( number ) );
}
- void commandStart( const QString & identifier ) {
+ void commandStart( const TQString & identifier ) {
write( "<command>" );
++indent;
write( "identifier", identifier );
@@ -408,7 +408,7 @@ public:
--indent;
write( "</command>" );
}
- void testStart( const QString & identifier ) {
+ void testStart( const TQString & identifier ) {
write( "<test>" );
++indent;
write( "identifier", identifier );
@@ -441,13 +441,13 @@ public:
--indent;
write( "</stringlist>" );
}
- void stringListEntry( const QString & string, bool multiline, const QString & hashComment ) {
+ void stringListEntry( const TQString & string, bool multiline, const TQString & hashComment ) {
stringArgument( string, multiline, hashComment );
}
- void hashComment( const QString & comment ) {
+ void hashComment( const TQString & comment ) {
write( "comment type=\"hash\"", comment );
}
- void bracketComment( const QString & comment ) {
+ void bracketComment( const TQString & comment ) {
write( "comment type=\"bracket\"", comment );
}
@@ -470,7 +470,7 @@ private:
cout << " ";
cout << msg << endl;
}
- void write( const QCString & key, const QString & value ) {
+ void write( const TQCString & key, const TQString & value ) {
if ( value.isEmpty() ) {
write( "<" + key + "/>" );
return;
@@ -498,12 +498,12 @@ public:
bool ok() const { return mOk; }
- void taggedArgument( const QString & tag ) {
+ void taggedArgument( const TQString & tag ) {
checkIs( TaggedArgument );
checkEquals( tag );
++mNextResponse;
}
- void stringArgument( const QString & string, bool multiline, const QString & /*fixme*/ ) {
+ void stringArgument( const TQString & string, bool multiline, const TQString & /*fixme*/ ) {
checkIs( StringArgument );
checkEquals( string );
checkEquals( multiline );
@@ -511,10 +511,10 @@ public:
}
void numberArgument( unsigned long number, char quantifier ) {
checkIs( NumberArgument );
- checkEquals( QString::number( number ) + ( quantifier ? quantifier : ' ' ) );
+ checkEquals( TQString::number( number ) + ( quantifier ? quantifier : ' ' ) );
++mNextResponse;
}
- void commandStart( const QString & identifier ) {
+ void commandStart( const TQString & identifier ) {
checkIs( CommandStart );
checkEquals( identifier );
++mNextResponse;
@@ -523,7 +523,7 @@ public:
checkIs( CommandEnd );
++mNextResponse;
}
- void testStart( const QString & identifier ) {
+ void testStart( const TQString & identifier ) {
checkIs( TestStart );
checkEquals( identifier );
++mNextResponse;
@@ -552,7 +552,7 @@ public:
checkIs( StringListArgumentStart );
++mNextResponse;
}
- void stringListEntry( const QString & string, bool multiLine, const QString & /*fixme*/ ) {
+ void stringListEntry( const TQString & string, bool multiLine, const TQString & /*fixme*/ ) {
checkIs( StringListEntry );
checkEquals( string );
checkEquals( multiLine );
@@ -562,12 +562,12 @@ public:
checkIs( StringListArgumentEnd );
++mNextResponse;
}
- void hashComment( const QString & comment ) {
+ void hashComment( const TQString & comment ) {
checkIs( HashComment );
checkEquals( comment );
++mNextResponse;
}
- void bracketComment( const QString & comment ) {
+ void bracketComment( const TQString & comment ) {
checkIs( BracketComment );
checkEquals( comment );
++mNextResponse;
@@ -577,7 +577,7 @@ public:
}
void error( const KSieve::Error & error ) {
checkIs( Error );
- checkEquals( QString( KSieve::Error::typeToString( error.type() ) ) );
+ checkEquals( TQString( KSieve::Error::typeToString( error.type() ) ) );
++mNextResponse;
}
void finished() {
@@ -599,8 +599,8 @@ private:
}
}
- void checkEquals( const QString & s ) {
- if ( s != QString::fromUtf8( currentResponse().string ) ) {
+ void checkEquals( const TQString & s ) {
+ if ( s != TQString::fromUtf8( currentResponse().string ) ) {
cerr << " expected string arg \""
<< ( currentResponse().string ? currentResponse().string : "<null>" )
<< "\", got \"" << ( s.isNull() ? "<null>" : s.utf8().data() ) << "\"";