mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
remove light XML log mode leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
fbf784fbe2
commit
09050f82c1
3 changed files with 11 additions and 19 deletions
|
@ -157,7 +157,7 @@ void initLogger()
|
|||
}
|
||||
case QTestLog::XML: {
|
||||
if(QTest::flushMode == QTestLog::FLushOn)
|
||||
QTest::testLogger = new QXmlTestLogger(QXmlTestLogger::Complete);
|
||||
QTest::testLogger = new QXmlTestLogger();
|
||||
else
|
||||
QTest::testLogger = new QTestLogger(QTestLogger::TLF_XML);
|
||||
break;
|
||||
|
|
|
@ -71,8 +71,8 @@ namespace QTest {
|
|||
}
|
||||
|
||||
|
||||
QXmlTestLogger::QXmlTestLogger(XmlMode mode )
|
||||
:xmlmode(mode), randomSeed(0), hasRandomSeed(false)
|
||||
QXmlTestLogger::QXmlTestLogger()
|
||||
: randomSeed(0), hasRandomSeed(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -86,14 +86,12 @@ void QXmlTestLogger::startLogging()
|
|||
QAbstractTestLogger::startLogging();
|
||||
QTestCharBuffer buf;
|
||||
|
||||
if (xmlmode == QXmlTestLogger::Complete) {
|
||||
QTestCharBuffer quotedTc;
|
||||
xmlQuote("edTc, QTestResult::currentTestObjectName());
|
||||
QTest::qt_asprintf(&buf,
|
||||
"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
|
||||
"<TestCase name=\"%s\">\n", quotedTc.constData());
|
||||
outputString(buf.constData());
|
||||
}
|
||||
QTestCharBuffer quotedTc;
|
||||
xmlQuote("edTc, QTestResult::currentTestObjectName());
|
||||
QTest::qt_asprintf(&buf,
|
||||
"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
|
||||
"<TestCase name=\"%s\">\n", quotedTc.constData());
|
||||
outputString(buf.constData());
|
||||
|
||||
if (hasRandomSeed) {
|
||||
QTest::qt_asprintf(&buf,
|
||||
|
@ -114,10 +112,7 @@ void QXmlTestLogger::startLogging()
|
|||
|
||||
void QXmlTestLogger::stopLogging()
|
||||
{
|
||||
if (xmlmode == QXmlTestLogger::Complete) {
|
||||
outputString("</TestCase>\n");
|
||||
}
|
||||
|
||||
outputString("</TestCase>\n");
|
||||
QAbstractTestLogger::stopLogging();
|
||||
}
|
||||
|
||||
|
|
|
@ -41,9 +41,7 @@ QT_BEGIN_NAMESPACE
|
|||
class QXmlTestLogger : public QAbstractTestLogger
|
||||
{
|
||||
public:
|
||||
enum XmlMode { Complete = 0, Light };
|
||||
|
||||
QXmlTestLogger(XmlMode mode = Complete);
|
||||
QXmlTestLogger();
|
||||
~QXmlTestLogger();
|
||||
|
||||
void startLogging();
|
||||
|
@ -67,7 +65,6 @@ public:
|
|||
static int xmlQuote(QTestCharBuffer *dest, char const* src, size_t n);
|
||||
|
||||
private:
|
||||
XmlMode xmlmode;
|
||||
unsigned int randomSeed;
|
||||
bool hasRandomSeed;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue