Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | #include <QtTest/private/qtestresult_p.h> | - |
35 | #include <QtTest/qtestassert.h> | - |
36 | #include <QtTest/private/qtestlog_p.h> | - |
37 | #include <QtTest/private/qplaintestlogger_p.h> | - |
38 | #include <QtTest/private/qbenchmark_p.h> | - |
39 | #include <QtTest/private/qbenchmarkmetric_p.h> | - |
40 | | - |
41 | #include <stdarg.h> | - |
42 | #include <stdio.h> | - |
43 | #include <stdlib.h> | - |
44 | #include <string.h> | - |
45 | | - |
46 | #ifdef Q_OS_WINCE | - |
47 | #include <QtCore/QString> | - |
48 | #endif | - |
49 | | - |
50 | #ifdef min // windows.h without NOMINMAX is included by the benchmark headers. | - |
51 | # undef min | - |
52 | #endif | - |
53 | #ifdef max | - |
54 | # undef max | - |
55 | #endif | - |
56 | | - |
57 | #include <QtCore/QByteArray> | - |
58 | #include <QtCore/qmath.h> | - |
59 | #include <QtCore/QLibraryInfo> | - |
60 | | - |
61 | #ifdef Q_OS_ANDROID | - |
62 | # include <android/log.h> | - |
63 | #endif | - |
64 | | - |
65 | #ifdef Q_OS_WIN | - |
66 | # include <qt_windows.h> | - |
67 | #endif | - |
68 | | - |
69 | QT_BEGIN_NAMESPACE | - |
70 | | - |
71 | namespace QTest { | - |
72 | | - |
73 | static const char *incidentType2String(QAbstractTestLogger::IncidentTypes type) | - |
74 | { | - |
75 | switch (type) { | - |
76 | case QAbstractTestLogger::Pass:executed 126704 times by 540 tests: case QAbstractTestLogger::Pass: Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 126704 |
77 | return "PASS ";executed 126704 times by 540 tests: return "PASS "; Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 126704 |
78 | case QAbstractTestLogger::XFail:executed 285 times by 38 tests: case QAbstractTestLogger::XFail: Executed by:- tst_LargeFile
- tst_QAbstractPrintDialog
- tst_QAuthenticator
- tst_QColumnView
- tst_QDBusAbstractInterface
- tst_QDateTime
- tst_QEventLoop
- tst_QFile
- tst_QGraphicsAnchorLayout
- tst_QGraphicsLayoutItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsView
- tst_QGuiEventLoop
- tst_QHttpNetworkConnection
- tst_QLatin1String
- tst_QLineEdit
- tst_QNetworkCookie
- tst_QNetworkReply
- tst_QPlainTextEdit
- tst_QRect
- tst_QSequentialAnimationGroup
- tst_QShortcut
- tst_QSqlDatabase
- tst_QSqlTableModel
- ...
| 285 |
79 | return "XFAIL ";executed 285 times by 38 tests: return "XFAIL "; Executed by:- tst_LargeFile
- tst_QAbstractPrintDialog
- tst_QAuthenticator
- tst_QColumnView
- tst_QDBusAbstractInterface
- tst_QDateTime
- tst_QEventLoop
- tst_QFile
- tst_QGraphicsAnchorLayout
- tst_QGraphicsLayoutItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsView
- tst_QGuiEventLoop
- tst_QHttpNetworkConnection
- tst_QLatin1String
- tst_QLineEdit
- tst_QNetworkCookie
- tst_QNetworkReply
- tst_QPlainTextEdit
- tst_QRect
- tst_QSequentialAnimationGroup
- tst_QShortcut
- tst_QSqlDatabase
- tst_QSqlTableModel
- ...
| 285 |
80 | case QAbstractTestLogger::Fail:executed 1032 times by 21 tests: case QAbstractTestLogger::Fail: Executed by:- tst_Gestures
- tst_QCommandLineParser
- tst_QFile
- tst_QGraphicsProxyWidget
- tst_QGraphicsWidget
- tst_QLocalSocket
- tst_QLocale
- tst_QLockFile
- tst_QNetworkReply
- tst_QOpenGLWidget
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QThreadStorage
- tst_QTouchEvent
- tst_QUdpSocket
- tst_QWidget
- tst_qmake
- tst_selftests - unknown status
| 1032 |
81 | return "FAIL! ";executed 1032 times by 21 tests: return "FAIL! "; Executed by:- tst_Gestures
- tst_QCommandLineParser
- tst_QFile
- tst_QGraphicsProxyWidget
- tst_QGraphicsWidget
- tst_QLocalSocket
- tst_QLocale
- tst_QLockFile
- tst_QNetworkReply
- tst_QOpenGLWidget
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextStream
- tst_QThreadStorage
- tst_QTouchEvent
- tst_QUdpSocket
- tst_QWidget
- tst_qmake
- tst_selftests - unknown status
| 1032 |
82 | case QAbstractTestLogger::XPass:executed 44 times by 1 test: case QAbstractTestLogger::XPass: Executed by:- tst_selftests - unknown status
| 44 |
83 | return "XPASS ";executed 44 times by 1 test: return "XPASS "; Executed by:- tst_selftests - unknown status
| 44 |
84 | case QAbstractTestLogger::BlacklistedPass:executed 528 times by 18 tests: case QAbstractTestLogger::BlacklistedPass: Executed by:- tst_QDBusAbstractAdaptor
- tst_QGestureRecognizer
- tst_QGraphicsView
- tst_QMdiArea
- tst_QNetworkInterface
- tst_QNetworkReply
- tst_QPauseAnimation
- tst_QSemaphore
- tst_QSizeGrip
- tst_QSocks5SocketEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket_onDemandCertificates_member
- tst_QTcpServer
- tst_QTextDocumentLayout
- tst_QUdpSocket
- tst_Spdy
- tst_selftests - unknown status
| 528 |
85 | return "BPASS ";executed 528 times by 18 tests: return "BPASS "; Executed by:- tst_QDBusAbstractAdaptor
- tst_QGestureRecognizer
- tst_QGraphicsView
- tst_QMdiArea
- tst_QNetworkInterface
- tst_QNetworkReply
- tst_QPauseAnimation
- tst_QSemaphore
- tst_QSizeGrip
- tst_QSocks5SocketEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket_onDemandCertificates_member
- tst_QTcpServer
- tst_QTextDocumentLayout
- tst_QUdpSocket
- tst_Spdy
- tst_selftests - unknown status
| 528 |
86 | case QAbstractTestLogger::BlacklistedFail:executed 17 times by 8 tests: case QAbstractTestLogger::BlacklistedFail: Executed by:- tst_QAction
- tst_QCompleter
- tst_QFtp
- tst_QSocks5SocketEngine
- tst_QSslSocket_onDemandCertificates_member
- tst_QTouchEvent
- tst_QWidget
- tst_selftests - unknown status
| 17 |
87 | return "BFAIL ";executed 17 times by 8 tests: return "BFAIL "; Executed by:- tst_QAction
- tst_QCompleter
- tst_QFtp
- tst_QSocks5SocketEngine
- tst_QSslSocket_onDemandCertificates_member
- tst_QTouchEvent
- tst_QWidget
- tst_selftests - unknown status
| 17 |
88 | } | - |
89 | return "??????"; never executed: return "??????"; | 0 |
90 | } | - |
91 | | - |
92 | static const char *benchmarkResult2String() | - |
93 | { | - |
94 | return "RESULT ";executed 94 times by 2 tests: return "RESULT "; Executed by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| 94 |
95 | } | - |
96 | | - |
97 | static const char *messageType2String(QAbstractTestLogger::MessageTypes type) | - |
98 | { | - |
99 | switch (type) { | - |
100 | case QAbstractTestLogger::Skip:executed 935 times by 56 tests: case QAbstractTestLogger::Skip: Executed by:- tst_Compiler
- tst_Lancelot
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QByteArray
- tst_QCssParser
- tst_QDBusConnection_NoApplication
- tst_QDBusLocalCalls
- tst_QDataStream
- tst_QDateTime
- tst_QDialog
- tst_QDir
- tst_QDockWidget
- tst_QFileInfo
- tst_QFiledialog
- tst_QFont
- tst_QFontDatabase
- tst_QFtp
- tst_QGLThreads
- tst_QGraphicsProxyWidget
- tst_QGraphicsView
- tst_QIODevice
- tst_QImageReader
- tst_QItemView
- tst_QLockFile
- ...
| 935 |
101 | return "SKIP ";executed 935 times by 56 tests: return "SKIP "; Executed by:- tst_Compiler
- tst_Lancelot
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QByteArray
- tst_QCssParser
- tst_QDBusConnection_NoApplication
- tst_QDBusLocalCalls
- tst_QDataStream
- tst_QDateTime
- tst_QDialog
- tst_QDir
- tst_QDockWidget
- tst_QFileInfo
- tst_QFiledialog
- tst_QFont
- tst_QFontDatabase
- tst_QFtp
- tst_QGLThreads
- tst_QGraphicsProxyWidget
- tst_QGraphicsView
- tst_QIODevice
- tst_QImageReader
- tst_QItemView
- tst_QLockFile
- ...
| 935 |
102 | case QAbstractTestLogger::Warn:executed 108 times by 13 tests: case QAbstractTestLogger::Warn: Executed by:- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsWidget
- tst_QGuiApplication
- tst_QLocalSocket
- tst_QMimeDatabase
- tst_QMouseEvent
- tst_QPluginLoader
- tst_QSqlQuery
- tst_QString_NoCastFromByteArray
- tst_QTreeView
- tst_QWidget
- tst_selftests - unknown status
| 108 |
103 | return "WARNING";executed 108 times by 13 tests: return "WARNING"; Executed by:- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsWidget
- tst_QGuiApplication
- tst_QLocalSocket
- tst_QMimeDatabase
- tst_QMouseEvent
- tst_QPluginLoader
- tst_QSqlQuery
- tst_QString_NoCastFromByteArray
- tst_QTreeView
- tst_QWidget
- tst_selftests - unknown status
| 108 |
104 | case QAbstractTestLogger::QWarning:executed 20632 times by 68 tests: case QAbstractTestLogger::QWarning: Executed by:- tst_Gestures
- tst_LargeFile
- tst_QAbstractItemView
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QBuffer
- tst_QByteArray
- tst_QColor
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialogButtonBox
- tst_QDirModel
- tst_QDrag
- tst_QEventLoop
- tst_QFileSystemWatcher
- tst_QFormLayout
- tst_QGLBuffer
- tst_QGlyphRun
- tst_QGraphicsAnchorLayout
- tst_QGraphicsItem
- tst_QGraphicsItemAnimation
- tst_QGraphicsProxyWidget
- ...
| 20632 |
105 | return "QWARN ";executed 20632 times by 68 tests: return "QWARN "; Executed by:- tst_Gestures
- tst_LargeFile
- tst_QAbstractItemView
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QBuffer
- tst_QByteArray
- tst_QColor
- tst_QDBusInterface
- tst_QDBusMarshall
- tst_QDataStream
- tst_QDateTimeEdit
- tst_QDialogButtonBox
- tst_QDirModel
- tst_QDrag
- tst_QEventLoop
- tst_QFileSystemWatcher
- tst_QFormLayout
- tst_QGLBuffer
- tst_QGlyphRun
- tst_QGraphicsAnchorLayout
- tst_QGraphicsItem
- tst_QGraphicsItemAnimation
- tst_QGraphicsProxyWidget
- ...
| 20632 |
106 | case QAbstractTestLogger::QDebug:executed 1949 times by 55 tests: case QAbstractTestLogger::QDebug: Executed by:- tst_Gestures
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QApplication
- tst_QBrush
- tst_QColumnView
- tst_QDBusInterface
- tst_QDateTime
- tst_QElapsedTimer
- tst_QEventLoop
- tst_QFileSystemWatcher
- tst_QFtp
- tst_QGraphicsScene
- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMdiSubWindow
- tst_QMimeDatabase
- tst_QMutex
- tst_QNetworkConfigurationManager
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- ...
| 1949 |
107 | return "QDEBUG ";executed 1949 times by 55 tests: return "QDEBUG "; Executed by:- tst_Gestures
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QApplication
- tst_QBrush
- tst_QColumnView
- tst_QDBusInterface
- tst_QDateTime
- tst_QElapsedTimer
- tst_QEventLoop
- tst_QFileSystemWatcher
- tst_QFtp
- tst_QGraphicsScene
- tst_QGuiEventLoop
- tst_QHostInfo
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMdiSubWindow
- tst_QMimeDatabase
- tst_QMutex
- tst_QNetworkConfigurationManager
- tst_QNetworkInterface
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- ...
| 1949 |
108 | case QAbstractTestLogger::QInfo:executed 22 times by 1 test: case QAbstractTestLogger::QInfo: Executed by:- tst_selftests - unknown status
| 22 |
109 | return "QINFO ";executed 22 times by 1 test: return "QINFO "; Executed by:- tst_selftests - unknown status
| 22 |
110 | case QAbstractTestLogger::QSystem:executed 12 times by 1 test: case QAbstractTestLogger::QSystem: Executed by:- tst_selftests - unknown status
| 12 |
111 | return "QSYSTEM";executed 12 times by 1 test: return "QSYSTEM"; Executed by:- tst_selftests - unknown status
| 12 |
112 | case QAbstractTestLogger::QFatal:executed 25 times by 2 tests: case QAbstractTestLogger::QFatal: Executed by:- tst_QNetworkReply
- tst_selftests - unknown status
| 25 |
113 | return "QFATAL ";executed 25 times by 2 tests: return "QFATAL "; Executed by:- tst_QNetworkReply
- tst_selftests - unknown status
| 25 |
114 | case QAbstractTestLogger::Info:executed 652 times by 1 test: case QAbstractTestLogger::Info: Executed by:- tst_selftests - unknown status
| 652 |
115 | return "INFO ";executed 652 times by 1 test: return "INFO "; Executed by:- tst_selftests - unknown status
| 652 |
116 | } | - |
117 | return "??????"; never executed: return "??????"; | 0 |
118 | } | - |
119 | | - |
120 | template <typename T> | - |
121 | static int countSignificantDigits(T num) | - |
122 | { | - |
123 | if (num <= 0)TRUE | evaluated 50 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| FALSE | evaluated 138 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
|
| 50-138 |
124 | return 0;executed 50 times by 2 tests: return 0; Executed by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| 50 |
125 | | - |
126 | int digits = 0; | - |
127 | qreal divisor = 1; | - |
128 | | - |
129 | while (num / divisor >= 1) {TRUE | evaluated 410 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| FALSE | evaluated 138 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
|
| 138-410 |
130 | divisor *= 10; | - |
131 | ++digits; | - |
132 | }executed 410 times by 2 tests: end of block Executed by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| 410 |
133 | | - |
134 | return digits;executed 138 times by 2 tests: return digits; Executed by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| 138 |
135 | } | - |
136 | | - |
137 | | - |
138 | template <typename T> QString formatResult(T number, int significantDigits) | - |
139 | { | - |
140 | if (number < T(0))TRUE | never evaluated | FALSE | evaluated 188 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
|
| 0-188 |
141 | return QLatin1String("NAN"); never executed: return QLatin1String("NAN"); | 0 |
142 | if (number == T(0))TRUE | evaluated 50 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| FALSE | evaluated 138 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
|
| 50-138 |
143 | return QLatin1String("0");executed 50 times by 2 tests: return QLatin1String("0"); Executed by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| 50 |
144 | | - |
145 | QString beforeDecimalPoint = QString::number(qint64(number), 'f', 0); | - |
146 | QString afterDecimalPoint = QString::number(number, 'f', 20); | - |
147 | afterDecimalPoint.remove(0, beforeDecimalPoint.count() + 1); | - |
148 | | - |
149 | int beforeUse = qMin(beforeDecimalPoint.count(), significantDigits); | - |
150 | int beforeRemove = beforeDecimalPoint.count() - beforeUse; | - |
151 | | - |
152 | | - |
153 | beforeDecimalPoint.chop(beforeRemove); | - |
154 | for (int i = 0; i < beforeRemove; ++i) {TRUE | never evaluated | FALSE | evaluated 138 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
|
| 0-138 |
155 | beforeDecimalPoint.append(QLatin1Char('0')); | - |
156 | } never executed: end of block | 0 |
157 | | - |
158 | int afterUse = significantDigits - beforeUse; | - |
159 | | - |
160 | | - |
161 | if (beforeDecimalPoint == QLatin1String("0") && afterDecimalPoint.isEmpty() == false) {TRUE | never evaluated | FALSE | evaluated 138 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
|
TRUE | never evaluated | FALSE | never evaluated |
| 0-138 |
162 | ++afterUse; | - |
163 | | - |
164 | int i = 0; | - |
165 | while (i < afterDecimalPoint.count() && afterDecimalPoint.at(i) == QLatin1Char('0')) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
166 | ++i; | - |
167 | } never executed: end of block | 0 |
168 | | - |
169 | afterUse += i; | - |
170 | } never executed: end of block | 0 |
171 | | - |
172 | int afterRemove = afterDecimalPoint.count() - afterUse; | - |
173 | afterDecimalPoint.chop(afterRemove); | - |
174 | | - |
175 | QChar separator = QLatin1Char(','); | - |
176 | QChar decimalPoint = QLatin1Char('.'); | - |
177 | | - |
178 | | - |
179 | int length = beforeDecimalPoint.length(); | - |
180 | for (int i = beforeDecimalPoint.length() -1; i >= 1; --i) {TRUE | evaluated 266 times by 1 testEvaluated by:- tst_selftests - unknown status
| FALSE | evaluated 138 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
|
| 138-266 |
181 | if ((length - i) % 3 == 0)TRUE | evaluated 40 times by 1 testEvaluated by:- tst_selftests - unknown status
| FALSE | evaluated 226 times by 1 testEvaluated by:- tst_selftests - unknown status
|
| 40-226 |
182 | beforeDecimalPoint.insert(i, separator);executed 40 times by 1 test: beforeDecimalPoint.insert(i, separator); Executed by:- tst_selftests - unknown status
| 40 |
183 | }executed 266 times by 1 test: end of block Executed by:- tst_selftests - unknown status
| 266 |
184 | | - |
185 | QString print; | - |
186 | print = beforeDecimalPoint; | - |
187 | if (afterUse > 0)TRUE | evaluated 4 times by 1 testEvaluated by:- tst_selftests - unknown status
| FALSE | evaluated 134 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
|
| 4-134 |
188 | print.append(decimalPoint);executed 4 times by 1 test: print.append(decimalPoint); Executed by:- tst_selftests - unknown status
| 4 |
189 | | - |
190 | print += afterDecimalPoint; | - |
191 | | - |
192 | | - |
193 | return print;executed 138 times by 2 tests: return print; Executed by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| 138 |
194 | } | - |
195 | | - |
196 | template <typename T> | - |
197 | int formatResult(char * buffer, int bufferSize, T number, int significantDigits) | - |
198 | { | - |
199 | QString result = formatResult(number, significantDigits); | - |
200 | qstrncpy(buffer, result.toLatin1().constData(), bufferSize); | - |
201 | int size = result.count(); | - |
202 | return size;executed 188 times by 2 tests: return size; Executed by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| 188 |
203 | } | - |
204 | } | - |
205 | | - |
206 | #if defined(Q_OS_WIN) | - |
207 | Q_CORE_EXPORT bool qt_logging_to_console(); | - |
208 | #endif | - |
209 | | - |
210 | void QPlainTestLogger::outputMessage(const char *str) | - |
211 | { | - |
212 | #if defined(Q_OS_WINCE) | - |
213 | QString strUtf16 = QString::fromLocal8Bit(str); | - |
214 | const int maxOutputLength = 255; | - |
215 | do { | - |
216 | QString tmp = strUtf16.left(maxOutputLength); | - |
217 | OutputDebugString((wchar_t*)tmp.utf16()); | - |
218 | strUtf16.remove(0, maxOutputLength); | - |
219 | } while (!strUtf16.isEmpty()); | - |
220 | if (stream != stdout) | - |
221 | #elif defined(Q_OS_WIN) | - |
222 | | - |
223 | if (!qt_logging_to_console() && stream == stdout) { | - |
224 | OutputDebugStringA(str); | - |
225 | return; | - |
226 | } | - |
227 | #elif defined(Q_OS_ANDROID) | - |
228 | __android_log_write(ANDROID_LOG_INFO, "QTestLib", str); | - |
229 | #endif | - |
230 | outputString(str); | - |
231 | }executed 154809 times by 540 tests: end of block Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 154809 |
232 | | - |
233 | void QPlainTestLogger::printMessage(const char *type, const char *msg, const char *file, int line) | - |
234 | { | - |
235 | QTEST_ASSERT(type); never executed: qt_assert("type",__FILE__,235); TRUE | never evaluated | FALSE | evaluated 152945 times by 540 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
| 0-152945 |
236 | QTEST_ASSERT(msg); never executed: qt_assert("msg",__FILE__,236); TRUE | never evaluated | FALSE | evaluated 152945 times by 540 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
| 0-152945 |
237 | | - |
238 | QTestCharBuffer buf; | - |
239 | | - |
240 | const char *fn = QTestResult::currentTestFunction() ? QTestResult::currentTestFunction()TRUE | evaluated 152945 times by 540 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| FALSE | never evaluated |
| 0-152945 |
241 | : "UnknownTestFunc"; | - |
242 | const char *tag = QTestResult::currentDataTag() ? QTestResult::currentDataTag() : "";TRUE | evaluated 120707 times by 361 testsEvaluated by:- tst_Collections
- tst_Gestures
- tst_LargeFile
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAccessibility
- tst_QAction
- tst_QAlgorithms
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QAtomicInt
- tst_QAtomicInteger_Gcc_char
- tst_QAtomicInteger_Gcc_char16_t
- tst_QAtomicInteger_Gcc_char32_t
- tst_QAtomicInteger_Gcc_int
- tst_QAtomicInteger_Gcc_long
- ...
| FALSE | evaluated 32238 times by 540 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
| 32238-120707 |
243 | const char *gtag = QTestResult::currentGlobalDataTag()TRUE | evaluated 3005 times by 15 testsEvaluated by:- tst_QDBusLocalCalls
- tst_QDnsLookup
- tst_QFtp
- tst_QHostInfo
- tst_QSqlDriver
- tst_QSqlRelationalTableModel
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QTcpServer
- tst_QTcpSocket
- tst_QUdpSocket
- tst_Utf8
- tst_qdbusxml2cpp
- tst_selftests - unknown status
| FALSE | evaluated 149940 times by 540 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
| 3005-149940 |
244 | ? QTestResult::currentGlobalDataTag() | - |
245 | : ""; | - |
246 | const char *filler = (tag[0] && gtag[0]) ? ":" : "";TRUE | evaluated 120690 times by 361 testsEvaluated by:- tst_Collections
- tst_Gestures
- tst_LargeFile
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAccessibility
- tst_QAction
- tst_QAlgorithms
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QAtomicInt
- tst_QAtomicInteger_Gcc_char
- tst_QAtomicInteger_Gcc_char16_t
- tst_QAtomicInteger_Gcc_char32_t
- tst_QAtomicInteger_Gcc_int
- tst_QAtomicInteger_Gcc_long
- ...
| FALSE | evaluated 32255 times by 540 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
TRUE | evaluated 2082 times by 11 testsEvaluated by:- tst_QDBusLocalCalls
- tst_QDnsLookup
- tst_QFtp
- tst_QHostInfo
- tst_QSslSocket
- tst_QTcpServer
- tst_QTcpSocket
- tst_QUdpSocket
- tst_Utf8
- tst_qdbusxml2cpp
- tst_selftests - unknown status
| FALSE | evaluated 118608 times by 351 testsEvaluated by:- tst_Collections
- tst_Gestures
- tst_LargeFile
- tst_NetworkSelfTest
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAccessibility
- tst_QAction
- tst_QAlgorithms
- tst_QApplication
- tst_QArrayData
- tst_QArrayData_StrictIterators
- tst_QAsn1Element
- tst_QAtomicInt
- tst_QAtomicInteger_Gcc_char
- tst_QAtomicInteger_Gcc_char16_t
- tst_QAtomicInteger_Gcc_char32_t
- tst_QAtomicInteger_Gcc_int
- tst_QAtomicInteger_Gcc_long
- ...
|
| 2082-120690 |
247 | if (file) {TRUE | evaluated 2527 times by 102 testsEvaluated by:- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAction
- tst_QAuthenticator
- tst_QByteArray
- tst_QColumnView
- tst_QCommandLineParser
- tst_QCompleter
- tst_QCssParser
- tst_QDBusAbstractInterface
- tst_QDBusConnection_NoApplication
- tst_QDBusLocalCalls
- tst_QDataStream
- tst_QDateTime
- tst_QDialog
- tst_QDir
- tst_QDockWidget
- tst_QEventLoop
- tst_QFile
- tst_QFileInfo
- ...
| FALSE | evaluated 150418 times by 540 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
| 2527-150418 |
248 | QTest::qt_asprintf(&buf, "%s: %s::%s(%s%s%s)%s%s\n" | - |
249 | #ifdef Q_OS_WIN | - |
250 | "%s(%d) : failure location\n" | - |
251 | #else | - |
252 | " Loc: [%s(%d)]\n" | - |
253 | #endif | - |
254 | , type, QTestResult::currentTestObjectName(), fn, gtag, filler, tag, | - |
255 | msg[0] ? " " : "", msg, file, line); | - |
256 | } else {executed 2527 times by 102 tests: end of block Executed by:- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAction
- tst_QAuthenticator
- tst_QByteArray
- tst_QColumnView
- tst_QCommandLineParser
- tst_QCompleter
- tst_QCssParser
- tst_QDBusAbstractInterface
- tst_QDBusConnection_NoApplication
- tst_QDBusLocalCalls
- tst_QDataStream
- tst_QDateTime
- tst_QDialog
- tst_QDir
- tst_QDockWidget
- tst_QEventLoop
- tst_QFile
- tst_QFileInfo
- ...
| 2527 |
257 | QTest::qt_asprintf(&buf, "%s: %s::%s(%s%s%s)%s%s\n", | - |
258 | type, QTestResult::currentTestObjectName(), fn, gtag, filler, tag, | - |
259 | msg[0] ? " " : "", msg); | - |
260 | }executed 150418 times by 540 tests: end of block Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 150418 |
261 | | - |
262 | | - |
263 | memcpy(buf.data(), type, strlen(type)); | - |
264 | outputMessage(buf.data()); | - |
265 | }executed 152945 times by 540 tests: end of block Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 152945 |
266 | | - |
267 | void QPlainTestLogger::printBenchmarkResult(const QBenchmarkResult &result) | - |
268 | { | - |
269 | const char *bmtag = QTest::benchmarkResult2String(); | - |
270 | | - |
271 | char buf1[1024]; | - |
272 | qsnprintf( | - |
273 | buf1, sizeof(buf1), "%s: %s::%s", | - |
274 | bmtag, | - |
275 | QTestResult::currentTestObjectName(), | - |
276 | result.context.slotName.toLatin1().data()); | - |
277 | | - |
278 | char bufTag[1024]; | - |
279 | bufTag[0] = 0; | - |
280 | QByteArray tag = result.context.tag.toLocal8Bit(); | - |
281 | if (tag.isEmpty() == false) {TRUE | evaluated 78 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| FALSE | evaluated 16 times by 1 testEvaluated by:- tst_selftests - unknown status
|
| 16-78 |
282 | qsnprintf(bufTag, sizeof(bufTag), ":\"%s\"", tag.data()); | - |
283 | }executed 78 times by 2 tests: end of block Executed by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| 78 |
284 | | - |
285 | | - |
286 | char fillFormat[8]; | - |
287 | int fillLength = 5; | - |
288 | qsnprintf(fillFormat, sizeof(fillFormat), ":\n%%%ds", fillLength); | - |
289 | char fill[1024]; | - |
290 | qsnprintf(fill, sizeof(fill), fillFormat, ""); | - |
291 | | - |
292 | const char * unitText = QTest::benchmarkMetricUnit(result.metric); | - |
293 | | - |
294 | qreal valuePerIteration = qreal(result.value) / qreal(result.iterations); | - |
295 | char resultBuffer[100] = ""; | - |
296 | QTest::formatResult(resultBuffer, 100, valuePerIteration, QTest::countSignificantDigits(result.value)); | - |
297 | | - |
298 | char buf2[1024]; | - |
299 | qsnprintf(buf2, sizeof(buf2), "%s %s", resultBuffer, unitText); | - |
300 | | - |
301 | char buf2_[1024]; | - |
302 | QByteArray iterationText = " per iteration"; | - |
303 | Q_ASSERT(result.iterations > 0); | - |
304 | qsnprintf(buf2_, sizeof(buf2_), "%s", iterationText.data()); | - |
305 | | - |
306 | char buf3[1024]; | - |
307 | Q_ASSERT(result.iterations > 0); | - |
308 | QTest::formatResult(resultBuffer, 100, result.value, QTest::countSignificantDigits(result.value)); | - |
309 | qsnprintf(buf3, sizeof(buf3), " (total: %s, iterations: %d)", resultBuffer, result.iterations); | - |
310 | | - |
311 | char buf[1024]; | - |
312 | | - |
313 | if (result.setByMacro) {TRUE | evaluated 94 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| FALSE | never evaluated |
| 0-94 |
314 | qsnprintf(buf, sizeof(buf), "%s%s%s%s%s%s\n", buf1, bufTag, fill, buf2, buf2_, buf3); | - |
315 | } else {executed 94 times by 2 tests: end of block Executed by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| 94 |
316 | qsnprintf(buf, sizeof(buf), "%s%s%s%s\n", buf1, bufTag, fill, buf2); | - |
317 | } never executed: end of block | 0 |
318 | | - |
319 | memcpy(buf, bmtag, strlen(bmtag)); | - |
320 | outputMessage(buf); | - |
321 | }executed 94 times by 2 tests: end of block Executed by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| 94 |
322 | | - |
323 | QPlainTestLogger::QPlainTestLogger(const char *filename) | - |
324 | : QAbstractTestLogger(filename) | - |
325 | { | - |
326 | }executed 888 times by 539 tests: end of block Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 888 |
327 | | - |
328 | QPlainTestLogger::~QPlainTestLogger() | - |
329 | { | - |
330 | } | - |
331 | | - |
332 | void QPlainTestLogger::startLogging() | - |
333 | { | - |
334 | QAbstractTestLogger::startLogging(); | - |
335 | | - |
336 | char buf[1024]; | - |
337 | if (QTestLog::verboseLevel() < 0) {TRUE | evaluated 2 times by 1 testEvaluated by:- tst_selftests - unknown status
| FALSE | evaluated 884 times by 539 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
| 2-884 |
338 | qsnprintf(buf, sizeof(buf), "Testing %s\n", QTestResult::currentTestObjectName()); | - |
339 | } else {executed 2 times by 1 test: end of block Executed by:- tst_selftests - unknown status
| 2 |
340 | qsnprintf(buf, sizeof(buf), | - |
341 | "********* Start testing of %s *********\n" | - |
342 | "Config: Using QtTest library " QTEST_VERSION_STR | - |
343 | ", %s\n", QTestResult::currentTestObjectName(), QLibraryInfo::build()); | - |
344 | }executed 884 times by 539 tests: end of block Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 884 |
345 | outputMessage(buf); | - |
346 | }executed 886 times by 539 tests: end of block Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 886 |
347 | | - |
348 | void QPlainTestLogger::stopLogging() | - |
349 | { | - |
350 | char buf[1024]; | - |
351 | if (QTestLog::verboseLevel() < 0) {TRUE | evaluated 2 times by 1 testEvaluated by:- tst_selftests - unknown status
| FALSE | evaluated 882 times by 539 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
| 2-882 |
352 | qsnprintf(buf, sizeof(buf), "Totals: %d passed, %d failed, %d skipped, %d blacklisted\n", | - |
353 | QTestLog::passCount(), QTestLog::failCount(), | - |
354 | QTestLog::skipCount(), QTestLog::blacklistCount()); | - |
355 | } else {executed 2 times by 1 test: end of block Executed by:- tst_selftests - unknown status
| 2 |
356 | qsnprintf(buf, sizeof(buf), | - |
357 | "Totals: %d passed, %d failed, %d skipped, %d blacklisted\n" | - |
358 | "********* Finished testing of %s *********\n", | - |
359 | QTestLog::passCount(), QTestLog::failCount(), | - |
360 | QTestLog::skipCount(), QTestLog::blacklistCount(), | - |
361 | QTestResult::currentTestObjectName()); | - |
362 | }executed 882 times by 539 tests: end of block Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 882 |
363 | outputMessage(buf); | - |
364 | | - |
365 | QAbstractTestLogger::stopLogging(); | - |
366 | }executed 884 times by 539 tests: end of block Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 884 |
367 | | - |
368 | | - |
369 | void QPlainTestLogger::enterTestFunction(const char * ) | - |
370 | { | - |
371 | if (QTestLog::verboseLevel() >= 1)TRUE | evaluated 340 times by 1 testEvaluated by:- tst_selftests - unknown status
| FALSE | evaluated 13022 times by 540 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
| 340-13022 |
372 | printMessage(QTest::messageType2String(Info), "entering");executed 340 times by 1 test: printMessage(QTest::messageType2String(Info), "entering"); Executed by:- tst_selftests - unknown status
| 340 |
373 | }executed 13362 times by 540 tests: end of block Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 13362 |
374 | | - |
375 | void QPlainTestLogger::leaveTestFunction() | - |
376 | { | - |
377 | } | - |
378 | | - |
379 | void QPlainTestLogger::addIncident(IncidentTypes type, const char *description, | - |
380 | const char *file, int line) | - |
381 | { | - |
382 | | - |
383 | if ((type == QAbstractTestLogger::Pass || type == QAbstractTestLogger::XFail)TRUE | evaluated 126710 times by 540 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| FALSE | evaluated 1908 times by 71 testsEvaluated by:- tst_Gestures
- tst_LargeFile
- tst_QAbstractPrintDialog
- tst_QAction
- tst_QAuthenticator
- tst_QColumnView
- tst_QCommandLineParser
- tst_QCompleter
- tst_QDBusAbstractAdaptor
- tst_QDBusAbstractInterface
- tst_QDateTime
- tst_QEventLoop
- tst_QFile
- tst_QFtp
- tst_QGestureRecognizer
- tst_QGraphicsAnchorLayout
- tst_QGraphicsLayoutItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QGuiEventLoop
- tst_QHttpNetworkConnection
- tst_QLatin1String
- tst_QLineEdit
- ...
|
TRUE | evaluated 287 times by 38 testsEvaluated by:- tst_LargeFile
- tst_QAbstractPrintDialog
- tst_QAuthenticator
- tst_QColumnView
- tst_QDBusAbstractInterface
- tst_QDateTime
- tst_QEventLoop
- tst_QFile
- tst_QGraphicsAnchorLayout
- tst_QGraphicsLayoutItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsView
- tst_QGuiEventLoop
- tst_QHttpNetworkConnection
- tst_QLatin1String
- tst_QLineEdit
- tst_QNetworkCookie
- tst_QNetworkReply
- tst_QPlainTextEdit
- tst_QRect
- tst_QSequentialAnimationGroup
- tst_QShortcut
- tst_QSqlDatabase
- tst_QSqlTableModel
- ...
| FALSE | evaluated 1621 times by 39 testsEvaluated by:- tst_Gestures
- tst_QAction
- tst_QCommandLineParser
- tst_QCompleter
- tst_QDBusAbstractAdaptor
- tst_QFile
- tst_QFtp
- tst_QGestureRecognizer
- tst_QGraphicsProxyWidget
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLocalSocket
- tst_QLocale
- tst_QLockFile
- tst_QMdiArea
- tst_QNetworkInterface
- tst_QNetworkReply
- tst_QOpenGLWidget
- tst_QPauseAnimation
- tst_QSemaphore
- tst_QSizeGrip
- tst_QSocks5SocketEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- ...
|
| 287-126710 |
384 | && QTestLog::verboseLevel() < 0)TRUE | evaluated 8 times by 1 testEvaluated by:- tst_selftests - unknown status
| FALSE | evaluated 126989 times by 540 testsEvaluated by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
|
| 8-126989 |
385 | return;executed 8 times by 1 test: return; Executed by:- tst_selftests - unknown status
| 8 |
386 | | - |
387 | printMessage(QTest::incidentType2String(type), description, file, line); | - |
388 | }executed 128610 times by 540 tests: end of block Executed by:- tst_Collections
- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractAnimation
- tst_QAbstractButton
- tst_QAbstractFileEngine
- tst_QAbstractItemModel
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAbstractPrintDialog
- tst_QAbstractProxyModel
- tst_QAbstractScrollArea
- tst_QAbstractSlider
- tst_QAbstractSocket
- tst_QAbstractSpinBox
- tst_QAbstractTextDocumentLayout
- tst_QAccessibility
- tst_QAction
- tst_QActionGroup
- tst_QAlgorithms
- ...
| 128610 |
389 | | - |
390 | void QPlainTestLogger::addBenchmarkResult(const QBenchmarkResult &result) | - |
391 | { | - |
392 | | - |
393 | if (QTestLog::verboseLevel() < 0)TRUE | never evaluated | FALSE | evaluated 94 times by 2 testsEvaluated by:- tst_QByteDataBuffer
- tst_selftests - unknown status
|
| 0-94 |
394 | return; never executed: return; | 0 |
395 | | - |
396 | printBenchmarkResult(result); | - |
397 | }executed 94 times by 2 tests: end of block Executed by:- tst_QByteDataBuffer
- tst_selftests - unknown status
| 94 |
398 | | - |
399 | void QPlainTestLogger::addMessage(MessageTypes type, const QString &message, | - |
400 | const char *file, int line) | - |
401 | { | - |
402 | | - |
403 | if (type != QAbstractTestLogger::QFatal && QTestLog::verboseLevel() < 0)TRUE | evaluated 23984 times by 135 testsEvaluated by:- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QBuffer
- tst_QByteArray
- tst_QColor
- tst_QColumnView
- tst_QCssParser
- tst_QDBusConnection_NoApplication
- tst_QDBusInterface
- tst_QDBusLocalCalls
- tst_QDBusMarshall
- tst_QDataStream
- tst_QDateTime
- tst_QDateTimeEdit
- tst_QDialog
- ...
| FALSE | evaluated 25 times by 2 testsEvaluated by:- tst_QNetworkReply
- tst_selftests - unknown status
|
TRUE | evaluated 14 times by 1 testEvaluated by:- tst_selftests - unknown status
| FALSE | evaluated 23970 times by 135 testsEvaluated by:- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QBuffer
- tst_QByteArray
- tst_QColor
- tst_QColumnView
- tst_QCssParser
- tst_QDBusConnection_NoApplication
- tst_QDBusInterface
- tst_QDBusLocalCalls
- tst_QDBusMarshall
- tst_QDataStream
- tst_QDateTime
- tst_QDateTimeEdit
- tst_QDialog
- ...
|
| 14-23984 |
404 | return;executed 14 times by 1 test: return; Executed by:- tst_selftests - unknown status
| 14 |
405 | | - |
406 | printMessage(QTest::messageType2String(type), qPrintable(message), file, line); | - |
407 | }executed 23995 times by 135 tests: end of block Executed by:- tst_Compiler
- tst_Gestures
- tst_Lancelot
- tst_LargeFile
- tst_ModelTest
- tst_NetworkSelfTest
- tst_PlatformSocketEngine
- tst_QAbstractItemView
- tst_QAbstractNetworkCache
- tst_QAccessibility
- tst_QApplication
- tst_QBrush
- tst_QBuffer
- tst_QByteArray
- tst_QColor
- tst_QColumnView
- tst_QCssParser
- tst_QDBusConnection_NoApplication
- tst_QDBusInterface
- tst_QDBusLocalCalls
- tst_QDBusMarshall
- tst_QDataStream
- tst_QDateTime
- tst_QDateTimeEdit
- tst_QDialog
- ...
| 23995 |
408 | | - |
409 | QT_END_NAMESPACE | - |
| | |