diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-08-30 18:36:46 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-01 03:10:39 +0200 |
commit | b17e9b3d94dc041ed80854076d2053e2c750eb50 (patch) | |
tree | a9835f6e982f071a59653d5dfb8680309c13159f /src/testlib/qtestxmlstreamer.h | |
parent | a4878db8df3fbaf9d222ec1206813b16dcdd90c7 (diff) |
Simplify qtestlib logging code, part 1
Both the old and new XML loggers produce the Complete and Light XML log
formats, while only the new logger produces Xunit XML logs. The
disadvantage of the new logger is that it is more complex and doesn't
produce a partial log if the test fails to terminate gracefully. This
behaviour arises because Xunit format output cannot be written correctly
until all tests have been executed.
This commit removes the Complete and Light XML formats from the new
logger, using the old logger to produce those formats and the new logger
to produce only Xunit XML. Prior to this commit, the qtestlib selftests
demonstrate that the old and new loggers produce identical output for
Complete and Light XML.
This commit also removes the undocumented -flush command-line option,
which was used rather obscurely to select between the old and new
loggers.
The newer logger will be renamed to QXunitTestLogger in a subsequent
commit.
Change-Id: Id304f5b411bdd520409ee233f6bc34e8917942ab
Reviewed-on: http://codereview.qt.nokia.com/3923
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'src/testlib/qtestxmlstreamer.h')
-rw-r--r-- | src/testlib/qtestxmlstreamer.h | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/testlib/qtestxmlstreamer.h b/src/testlib/qtestxmlstreamer.h deleted file mode 100644 index 96e8246779..0000000000 --- a/src/testlib/qtestxmlstreamer.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtTest module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTESTXMLSTREAMER_H -#define QTESTXMLSTREAMER_H - -#include <QtTest/qtestbasicstreamer.h> - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Test) - -class QTestElement; -class QTestElementAttribute; - -class QTestXmlStreamer: public QTestBasicStreamer -{ - public: - QTestXmlStreamer(QTestLogger *logger); - ~QTestXmlStreamer(); - - void formatStart(const QTestElement *element, QTestCharBuffer *formatted) const; - void formatEnd(const QTestElement *element, QTestCharBuffer *formatted) const; - void formatBeforeAttributes(const QTestElement *element, QTestCharBuffer *formatted) const; - void output(QTestElement *element) const; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif |