mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 10:22:55 +00:00
remove non-operational QTestLogger bits
QTestLogger::errorLogElement is always null Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
09050f82c1
commit
d5b194b53a
5 changed files with 30 additions and 37 deletions
|
@ -34,31 +34,31 @@ struct QTestCharBuffer;
|
|||
|
||||
class Q_TEST_EXPORT QTestBasicStreamer
|
||||
{
|
||||
public:
|
||||
QTestBasicStreamer();
|
||||
virtual ~QTestBasicStreamer();
|
||||
public:
|
||||
QTestBasicStreamer();
|
||||
virtual ~QTestBasicStreamer();
|
||||
|
||||
virtual void output(QTestElement *element) const;
|
||||
virtual void output(QTestElement *element) const;
|
||||
|
||||
void outputString(const char *msg) const;
|
||||
bool isTtyOutput();
|
||||
void startStreaming();
|
||||
void stopStreaming();
|
||||
void outputString(const char *msg) const;
|
||||
bool isTtyOutput();
|
||||
void startStreaming();
|
||||
void stopStreaming();
|
||||
|
||||
void setLogger(const QTestLogger *tstLogger);
|
||||
const QTestLogger *logger() const;
|
||||
void setLogger(const QTestLogger *tstLogger);
|
||||
const QTestLogger *logger() const;
|
||||
|
||||
protected:
|
||||
virtual void formatStart(const QTestElement *element, QTestCharBuffer *formatted) const;
|
||||
virtual void formatEnd(const QTestElement *element, QTestCharBuffer *formatted) const;
|
||||
virtual void formatBeforeAttributes(const QTestElement *element, QTestCharBuffer *formatted) const;
|
||||
virtual void formatAfterAttributes(const QTestElement *element, QTestCharBuffer *formatted) const;
|
||||
virtual void formatAttributes(const QTestElement *element, const QTestElementAttribute *attribute, QTestCharBuffer *formatted) const;
|
||||
virtual void outputElements(QTestElement *element, bool isChildElement = false) const;
|
||||
virtual void outputElementAttributes(const QTestElement *element, QTestElementAttribute *attribute) const;
|
||||
protected:
|
||||
virtual void formatStart(const QTestElement *element, QTestCharBuffer *formatted) const;
|
||||
virtual void formatEnd(const QTestElement *element, QTestCharBuffer *formatted) const;
|
||||
virtual void formatBeforeAttributes(const QTestElement *element, QTestCharBuffer *formatted) const;
|
||||
virtual void formatAfterAttributes(const QTestElement *element, QTestCharBuffer *formatted) const;
|
||||
virtual void formatAttributes(const QTestElement *element, const QTestElementAttribute *attribute, QTestCharBuffer *formatted) const;
|
||||
virtual void outputElements(QTestElement *element, bool isChildElement = false) const;
|
||||
virtual void outputElementAttributes(const QTestElement *element, QTestElementAttribute *attribute) const;
|
||||
|
||||
private:
|
||||
const QTestLogger *testLogger;
|
||||
private:
|
||||
const QTestLogger *testLogger;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
@ -29,12 +29,12 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class Q_TEST_EXPORT QTestFileLogger
|
||||
{
|
||||
public:
|
||||
QTestFileLogger();
|
||||
~QTestFileLogger();
|
||||
public:
|
||||
QTestFileLogger();
|
||||
~QTestFileLogger();
|
||||
|
||||
void init();
|
||||
void flush(const char *msg);
|
||||
void init();
|
||||
void flush(const char *msg);
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QTestLogger::QTestLogger(TestLoggerFormat fm)
|
||||
: listOfTestcases(0), currentLogElement(0), errorLogElement(0),
|
||||
logFormatter(0), format( (TestLoggerFormat)fm ), filelogger(new QTestFileLogger),
|
||||
: listOfTestcases(0), currentLogElement(0),
|
||||
logFormatter(0), format(fm), filelogger(new QTestFileLogger()),
|
||||
testCounter(0), passCounter(0), failureCounter(0), errorCounter(0),
|
||||
skipCounter(0), randomSeed_(0), hasRandomSeed_(false)
|
||||
{
|
||||
|
@ -246,13 +246,6 @@ void QTestLogger::addMessage(MessageTypes type, const char *message, const char
|
|||
|
||||
currentLogElement->addLogElement(errorElement);
|
||||
++errorCounter;
|
||||
|
||||
// Also add the message to the system error log (i.e. stderr), if one exists
|
||||
if (errorLogElement) {
|
||||
QTestElement *systemErrorElement = new QTestElement(QTest::LET_Error);
|
||||
systemErrorElement->addAttribute(QTest::AI_Description, message);
|
||||
errorLogElement->addLogElement(systemErrorElement);
|
||||
}
|
||||
}
|
||||
|
||||
void QTestLogger::registerRandomSeed(unsigned int seed)
|
||||
|
|
|
@ -74,7 +74,6 @@ public:
|
|||
private:
|
||||
QTestElement *listOfTestcases;
|
||||
QTestElement *currentLogElement;
|
||||
QTestElement *errorLogElement;
|
||||
QTestBasicStreamer *logFormatter;
|
||||
TestLoggerFormat format;
|
||||
QTestFileLogger *filelogger;
|
||||
|
|
|
@ -33,12 +33,13 @@
|
|||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QTestXmlStreamer::QTestXmlStreamer()
|
||||
:QTestBasicStreamer()
|
||||
: QTestBasicStreamer()
|
||||
{
|
||||
}
|
||||
|
||||
QTestXmlStreamer::~QTestXmlStreamer()
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
void QTestXmlStreamer::formatStart(const QTestElement *element, QTestCharBuffer *formatted) const
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue