Changeset 561 for trunk/src/testlib/qtestlog.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/testlib/qtestlog.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information ([email protected]) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation ([email protected]) 5 6 ** 6 7 ** This file is part of the QtTest module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you 37 ** @nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 47 47 #include "QtTest/private/qplaintestlogger_p.h" 48 48 #include "QtTest/private/qxmltestlogger_p.h" 49 50 49 #include <QtCore/qatomic.h> 51 50 #include <QtCore/qbytearray.h> … … 54 53 #include <string.h> 55 54 #include <limits.h> 55 56 57 56 58 57 59 QT_BEGIN_NAMESPACE … … 84 86 85 87 static QTestLog::LogMode logMode = QTestLog::Plain; 88 86 89 static int verbosity = 0; 87 90 static int maxWarnings = 2002; … … 137 140 if (!counter.deref()) { 138 141 QTest::testLogger->addMessage(QAbstractTestLogger::QSystem, 139 "Maximum amount of warnings exceeded. ");142 "Maximum amount of warnings exceeded."); 140 143 return; 141 144 } … … 271 274 272 275 switch (QTest::logMode) { 273 case QTestLog::Plain: 274 QTest::testLogger = new QPlainTestLogger(); 275 break; 276 case QTestLog::XML: 277 QTest::testLogger = new QXmlTestLogger(QXmlTestLogger::Complete); 278 break; 279 case QTestLog::LightXML: 280 QTest::testLogger = new QXmlTestLogger(QXmlTestLogger::Light); 281 } 276 case QTestLog::Plain: 277 QTest::testLogger = new QPlainTestLogger; 278 break; 279 case QTestLog::XML:{ 280 if(QTest::flushMode == QTestLog::FLushOn) 281 QTest::testLogger = new QXmlTestLogger(QXmlTestLogger::Complete); 282 else 283 QTest::testLogger = new QTestLogger(QTestLogger::TLF_XML); 284 break; 285 }case QTestLog::LightXML:{ 286 if(QTest::flushMode == QTestLog::FLushOn) 287 QTest::testLogger = new QXmlTestLogger(QXmlTestLogger::Light); 288 else 289 QTest::testLogger = new QTestLogger(QTestLogger::TLF_LightXml); 290 break; 291 }case QTestLog::XunitXML: 292 QTest::testLogger = new QTestLogger(QTestLogger::TLF_XunitXml); 293 } 282 294 283 295 QTest::testLogger->startLogging(); … … 298 310 void QTestLog::warn(const char *msg) 299 311 { 312 300 313 QTEST_ASSERT(msg); 301 314 … … 308 321 309 322 if (QTest::testLogger) 310 QTest::testLogger->addMessage(QAbstractTestLogger::Info, msg, file, line);323 QTest::testLogger->addMessage(QAbstractTestLogger::Info, msg, file, line); 311 324 } 312 325 … … 362 375 } 363 376 377 378 379 380 381 364 382 QT_END_NAMESPACE
Note:
See TracChangeset
for help on using the changeset viewer.