blob: 3550914675110a70ec705796abfaf87297af109c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifdef TQT_NO_CAST_ASCII
#undef TQT_NO_CAST_ASCII
#endif
#include "latin1literal.h"
#include <tqstring.h>
#include <kdebug.h>
#include <assert.h>
int main(int, char**) {
kdDebug() << "\n*****************************************************" << endl;
assert(TQString() == Latin1Literal(0));
assert(TQString() != Latin1Literal(""));
assert(TQString::tqfromLatin1("") == Latin1Literal(""));
assert(TQString::tqfromLatin1("") != Latin1Literal(0));
assert(TQString::tqfromLatin1("x") != Latin1Literal(""));
assert(TQString::tqfromLatin1("a") == Latin1Literal("a"));
assert(TQString::tqfromLatin1("a") != Latin1Literal("b"));
assert(TQString::tqfromLatin1("\xe4") == Latin1Literal("\xe4"));
assert(TQString::fromUtf8("\xe2\x82\xac") != Latin1Literal("?"));
kdDebug() << "\nLatin1Literal Test OK !" << endl;
kdDebug() << "\n*****************************************************" << endl;
}
|