#include <qxmltestlogger_p.h>
|
enum | XmlMode { Complete = 0,
Light
} |
|
enum | IncidentTypes { Pass,
XFail,
Fail,
XPass
} |
|
enum | MessageTypes {
Warn,
QWarning,
QDebug,
QSystem,
QFatal,
Skip,
Info
} |
|
Definition at line 61 of file qxmltestlogger_p.h.
◆ XmlMode
◆ QXmlTestLogger()
◆ ~QXmlTestLogger()
QXmlTestLogger::~QXmlTestLogger |
( |
| ) |
|
◆ addBenchmarkResult()
Implements QAbstractTestLogger.
Definition at line 249 of file qxmltestlogger.cpp.
QTest::QBenchmarkMetric metric
static void outputString(const char *msg)
int qt_asprintf(QTestCharBuffer *str, const char *format,...)
const char * constData() const
const char * constData() const
Returns a pointer to the data stored in the byte array.
static const char * benchmarkResultFormatString()
const char * benchmarkMetricName(QBenchmarkMetric metric)
static int xmlQuote(QTestCharBuffer *dest, char const *src)
QByteArray toAscii() const Q_REQUIRED_RESULT
Returns an 8-bit representation of the string as a QByteArray.
QBenchmarkContext context
static QByteArray number(int, int base=10)
Returns a byte array containing the string equivalent of the number n to base base (10 by default)...
◆ addIncident()
void QXmlTestLogger::addIncident |
( |
IncidentTypes |
type, |
|
|
const char * |
description, |
|
|
const char * |
file = 0 , |
|
|
int |
line = 0 |
|
) |
| |
|
virtual |
Implements QAbstractTestLogger.
Definition at line 218 of file qxmltestlogger.cpp.
224 const char *filler = (tag && gtag) ?
":" :
"";
235 xmlCdata(&cdataDescription, description);
static const char * xmlIncidentType2String(QAbstractTestLogger::IncidentTypes type)
static void outputString(const char *msg)
int qt_asprintf(QTestCharBuffer *str, const char *format,...)
static int xmlCdata(QTestCharBuffer *dest, char const *src)
static const char * incidentFormatString(bool noDescription, bool noTag)
static bool isEmpty(const char *str)
const char * constData() const
static const char * currentGlobalDataTag()
static int xmlQuote(QTestCharBuffer *dest, char const *src)
static const char * currentDataTag()
◆ addMessage()
void QXmlTestLogger::addMessage |
( |
MessageTypes |
type, |
|
|
const char * |
message, |
|
|
const char * |
file = 0 , |
|
|
int |
line = 0 |
|
) |
| |
|
virtual |
Implements QAbstractTestLogger.
Definition at line 269 of file qxmltestlogger.cpp.
275 const char *filler = (tag && gtag) ?
":" :
"";
286 xmlCdata(&cdataDescription, message);
static void outputString(const char *msg)
static const char * xmlMessageType2String(QAbstractTestLogger::MessageTypes type)
int qt_asprintf(QTestCharBuffer *str, const char *format,...)
static int xmlCdata(QTestCharBuffer *dest, char const *src)
static bool isEmpty(const char *str)
const char * constData() const
static const char * currentGlobalDataTag()
static const char * messageFormatString(bool noDescription, bool noTag)
static int xmlQuote(QTestCharBuffer *dest, char const *src)
static const char * currentDataTag()
◆ enterTestFunction()
void QXmlTestLogger::enterTestFunction |
( |
const char * |
function | ) |
|
|
virtual |
Implements QAbstractTestLogger.
Definition at line 145 of file qxmltestlogger.cpp.
149 xmlQuote("edFunction,
function);
static void outputString(const char *msg)
int qt_asprintf(QTestCharBuffer *str, const char *format,...)
const char * constData() const
static int xmlQuote(QTestCharBuffer *dest, char const *src)
◆ leaveTestFunction()
void QXmlTestLogger::leaveTestFunction |
( |
| ) |
|
|
virtual |
◆ registerRandomSeed()
void QXmlTestLogger::registerRandomSeed |
( |
unsigned int |
seed | ) |
|
|
virtual |
◆ startLogging()
void QXmlTestLogger::startLogging |
( |
| ) |
|
|
virtual |
Reimplemented from QAbstractTestLogger.
Definition at line 105 of file qxmltestlogger.cpp.
114 "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" 115 "<TestCase name=\"%s\">\n", quotedTc.
constData());
122 " <QtVersion>%s</QtVersion>\n" 124 " <RandomSeed>%d</RandomSeed>\n" 129 " <QtVersion>%s</QtVersion>\n" static void outputString(const char *msg)
int qt_asprintf(QTestCharBuffer *str, const char *format,...)
Q_CORE_EXPORT const char * qVersion()
static const char * currentTestObjectName()
const char * constData() const
#define QTEST_VERSION_STR
static int xmlQuote(QTestCharBuffer *dest, char const *src)
virtual void startLogging()
◆ stopLogging()
void QXmlTestLogger::stopLogging |
( |
| ) |
|
|
virtual |
◆ xmlCdata() [1/2]
◆ xmlCdata() [2/2]
int QXmlTestLogger::xmlCdata |
( |
QTestCharBuffer * |
dest, |
|
|
char const * |
src, |
|
|
size_t |
n |
|
) |
| |
|
static |
Definition at line 365 of file qxmltestlogger.cpp.
369 char *dest = destBuf->
data();
371 if (!src || n == 1) {
376 static char const CDATA_END[] =
"]]>";
377 static char const CDATA_END_ESCAPED[] =
"]]]><![CDATA[]>";
380 char*
end = dest + n;
387 if (!strncmp(src, CDATA_END,
sizeof(CDATA_END)-1)) {
388 if (dest +
sizeof(CDATA_END_ESCAPED) < end) {
389 strcpy(dest, CDATA_END_ESCAPED);
390 src +=
sizeof(CDATA_END)-1;
391 dest +=
sizeof(CDATA_END_ESCAPED) - 1;
395 return (dest+
sizeof(CDATA_END_ESCAPED)-begin);
static const KeyPair *const end
◆ xmlQuote() [1/2]
Definition at line 443 of file qxmltestlogger.cpp.
Referenced by addBenchmarkResult(), addIncident(), addMessage(), enterTestFunction(), QTestXunitStreamer::formatAttributes(), QTestLightXmlStreamer::formatBeforeAttributes(), QTestLightXmlStreamer::formatStart(), QTestXmlStreamer::formatStart(), QTestXmlStreamer::output(), and startLogging().
int allocateStringFn(QTestCharBuffer *str, char const *src, StringFormatFunction func)
static int xmlQuote(QTestCharBuffer *dest, char const *src)
◆ xmlQuote() [2/2]
int QXmlTestLogger::xmlQuote |
( |
QTestCharBuffer * |
dest, |
|
|
char const * |
src, |
|
|
size_t |
n |
|
) |
| |
|
static |
Definition at line 305 of file qxmltestlogger.cpp.
307 if (n == 0)
return 0;
309 char *dest = destBuf->
data();
314 char*
end = dest + n;
319 #define MAP_ENTITY(chr, ent) \ 321 if (dest + sizeof(ent) < end) { \ 323 dest += sizeof(ent) - 1; \ 327 return (dest+sizeof(ent)-begin); \
#define MAP_ENTITY(chr, ent)
static const KeyPair *const end
◆ hasRandomSeed
bool QXmlTestLogger::hasRandomSeed |
|
private |
◆ randomSeed
unsigned int QXmlTestLogger::randomSeed |
|
private |
◆ xmlmode
The documentation for this class was generated from the following files: