#include <QBuffer>#include <QRegExp>Graphe des dépendances par inclusion de xmlwritertest.h:
Ce graphe montre quels fichiers incluent directement ou indirectement ce fichier :
Aller au code source de ce fichier.
Macros | |
| #define | QT_NO_CAST_ASCII |
| #define | TEST_BEGIN(publicId, systemId) |
| #define | TEST_END(testname, expected) |
| #define QT_NO_CAST_ASCII |
Définition à la ligne 4 du fichier xmlwritertest.h.
| #define TEST_BEGIN | ( | publicId, | |||
| systemId | ) |
Valeur :
{ \
QByteArray cstr; \
QBuffer buffer( &cstr ); \
buffer.open( QIODevice::WriteOnly ); \
{ \
KoXmlWriter writer( &buffer ); \
writer.startDocument( "r", publicId, systemId ); \
writer.startElement( "r" )
Définition à la ligne 12 du fichier xmlwritertest.h.
Référencé par main(), testDefaultStyle(), testLookup(), et testUserStyles().
| #define TEST_END | ( | testname, | |||
| expected | ) |
Valeur :
writer.endElement(); \
writer.endDocument(); \
} \
buffer.putch( '\0' ); /*null-terminate*/ \
QString expectedFull = QString::fromLatin1( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ); \
expectedFull += QString::fromLatin1( expected ); \
QString s1 = QString::fromLatin1( cstr ); \
if ( s1 == expectedFull ) \
qDebug( "%s OK", testname ); \
else { \
qDebug( "%s FAILED!", testname ); \
QString s2 = expectedFull; \
if ( s1.length() != s2.length() ) \
qDebug( "got length %d, expected %d", s1.length(), s2.length() ); \
s1.replace( QRegExp( QString::fromLatin1( "[x]{1000}" ) ), QString::fromLatin1( "[x]*1000" ) ); \
s2.replace( QRegExp( QString::fromLatin1( "[x]{1000}" ) ), QString::fromLatin1( "[x]*1000" ) ); \
qDebug( "%s", qPrintable( s1 ) ); \
qDebug( "Expected:\n%s", qPrintable( s2 ) ); \
return 1; /*exit*/ \
} \
}
Définition à la ligne 22 du fichier xmlwritertest.h.
Référencé par main(), testDefaultStyle(), testLookup(), et testUserStyles().
1.5.1-p1