OpenCoverage

qtestcase.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/testlib/qtestcase.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Copyright (C) 2016 Intel Corporation.-
5** Contact: https://www.qt.io/licensing/-
6**-
7** This file is part of the QtTest module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL$-
10** Commercial License Usage-
11** Licensees holding valid commercial Qt licenses may use this file in-
12** accordance with the commercial license agreement provided with the-
13** Software or, alternatively, in accordance with the terms contained in-
14** a written agreement between you and The Qt Company. For licensing terms-
15** and conditions see https://www.qt.io/terms-conditions. For further-
16** information use the contact form at https://www.qt.io/contact-us.-
17**-
18** GNU Lesser General Public License Usage-
19** Alternatively, this file may be used under the terms of the GNU Lesser-
20** General Public License version 3 as published by the Free Software-
21** Foundation and appearing in the file LICENSE.LGPL3 included in the-
22** packaging of this file. Please review the following information to-
23** ensure the GNU Lesser General Public License version 3 requirements-
24** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
25**-
26** GNU General Public License Usage-
27** Alternatively, this file may be used under the terms of the GNU-
28** General Public License version 2.0 or (at your option) the GNU General-
29** Public license version 3 or any later version approved by the KDE Free-
30** Qt Foundation. The licenses are as published by the Free Software-
31** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
32** included in the packaging of this file. Please review the following-
33** information to ensure the GNU General Public License requirements will-
34** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
35** https://www.gnu.org/licenses/gpl-3.0.html.-
36**-
37** $QT_END_LICENSE$-
38**-
39****************************************************************************/-
40-
41#include <QtTest/qtestcase.h>-
42#include <QtTest/qtestassert.h>-
43-
44#include <QtCore/qbytearray.h>-
45#include <QtCore/qmetaobject.h>-
46#include <QtCore/qobject.h>-
47#include <QtCore/qstringlist.h>-
48#include <QtCore/qvector.h>-
49#include <QtCore/qvarlengtharray.h>-
50#include <QtCore/qcoreapplication.h>-
51#include <QtCore/qfile.h>-
52#include <QtCore/qfileinfo.h>-
53#include <QtCore/qdir.h>-
54#include <QtCore/qprocess.h>-
55#include <QtCore/qdebug.h>-
56#include <QtCore/qlibraryinfo.h>-
57#include <QtCore/private/qtools_p.h>-
58#include <QtCore/qdiriterator.h>-
59#include <QtCore/qtemporarydir.h>-
60#include <QtCore/qthread.h>-
61#include <QtCore/qwaitcondition.h>-
62#include <QtCore/qmutex.h>-
63-
64#include <QtTest/private/qtestlog_p.h>-
65#include <QtTest/private/qtesttable_p.h>-
66#include <QtTest/qtestdata.h>-
67#include <QtTest/private/qtestresult_p.h>-
68#include <QtTest/private/qsignaldumper_p.h>-
69#include <QtTest/private/qbenchmark_p.h>-
70#include <QtTest/private/cycle_p.h>-
71#include <QtTest/private/qtestblacklist_p.h>-
72#if defined(HAVE_XCTEST)-
73#include <QtTest/private/qxctestlogger_p.h>-
74#endif-
75#if defined Q_OS_MACOS-
76#include <QtTest/private/qtestutil_macos_p.h>-
77#endif-
78-
79#include <numeric>-
80#include <algorithm>-
81-
82#include <stdarg.h>-
83#include <stdio.h>-
84#include <stdlib.h>-
85-
86#if defined(Q_OS_LINUX)-
87#include <sys/types.h>-
88#include <unistd.h>-
89#include <fcntl.h>-
90#endif-
91-
92#ifdef Q_OS_WIN-
93#ifndef Q_OS_WINCE-
94# if !defined(Q_CC_MINGW) || (defined(Q_CC_MINGW) && defined(__MINGW64_VERSION_MAJOR))-
95# include <crtdbg.h>-
96# endif-
97#endif-
98#include <windows.h> // for Sleep-
99#endif-
100#ifdef Q_OS_UNIX-
101#include <errno.h>-
102#include <signal.h>-
103#include <time.h>-
104#endif-
105-
106#if defined(Q_OS_MACX)-
107#include <IOKit/pwr_mgt/IOPMLib.h>-
108#endif-
109-
110#include <vector>-
111-
112QT_BEGIN_NAMESPACE-
113-
114using QtMiscUtils::toHexUpper;-
115using QtMiscUtils::fromHex;-
116-
117-
118static void stackTrace()-
119{-
120 bool ok = false;-
121 const int disableStackDump = qEnvironmentVariableIntValue("QTEST_DISABLE_STACK_DUMP", &ok);-
122 if (ok && disableStackDump == 1)
okDescription
TRUEnever evaluated
FALSEnever evaluated
disableStackDump == 1Description
TRUEnever evaluated
FALSEnever evaluated
0
123 return;
never executed: return;
0
124#ifdef Q_OS_LINUX-
125 fprintf(stderr, "\n========= Received signal, dumping stack ==============\n");-
126 char cmd[512];-
127 qsnprintf(cmd, 512, "gdb --pid %d 2>/dev/null <<EOF\n"-
128 "set prompt\n"-
129 "set height 0\n"-
130 "thread apply all where full\n"-
131 "detach\n"-
132 "quit\n"-
133 "EOF\n",-
134 (int)getpid());-
135 if (system(cmd) == -1)
system(cmd) == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
136 fprintf(stderr, "calling gdb failed\n");
never executed: fprintf(stderr, "calling gdb failed\n");
0
137 fprintf(stderr, "========= End of stack trace ==============\n");-
138#elif defined(Q_OS_OSX)-
139 fprintf(stderr, "\n========= Received signal, dumping stack ==============\n");-
140 char cmd[512];-
141 qsnprintf(cmd, 512, "lldb -p %d 2>/dev/null <<EOF\n"-
142 "bt all\n"-
143 "quit\n"-
144 "EOF\n",-
145 (int)getpid());-
146 if (system(cmd) == -1)-
147 fprintf(stderr, "calling lldb failed\n");-
148 fprintf(stderr, "========= End of stack trace ==============\n");-
149#endif-
150}
never executed: end of block
0
151-
152static bool installCoverageTool(const char * appname, const char * testname)-
153{-
154#ifdef __COVERAGESCANNER__-
155 if (!qEnvironmentVariableIsEmpty("QT_TESTCOCOON_ACTIVE"))
!qEnvironmentV...OCOON_ACTIVE")Description
TRUEevaluated 811 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
0-811
156 return false;
executed 811 times by 1 test: return false;
Executed by:
  • tst_selftests - unknown status
811
157 // Set environment variable QT_TESTCOCOON_ACTIVE to prevent an eventual subtest from-
158 // being considered as a stand-alone test regarding the coverage analysis.-
159 qputenv("QT_TESTCOCOON_ACTIVE", "1");-
160-
161 // Install Coverage Tool-
162 __coveragescanner_install(appname);-
163 __coveragescanner_testname(testname);-
164 __coveragescanner_clear();-
165 return true;
executed 509 times by 505 tests: return true;
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
  • ...
509
166#else-
167 Q_UNUSED(appname);-
168 Q_UNUSED(testname);-
169 return false;-
170#endif-
171}-
172-
173static bool isValidSlot(const QMetaMethod &sl)-
174{-
175 if (sl.access() != QMetaMethod::Private || sl.parameterCount() != 0
sl.access() !=...ethod::PrivateDescription
TRUEevaluated 5826 times by 506 tests
Evaluated 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
  • ...
FALSEevaluated 19985 times by 506 tests
Evaluated 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
  • ...
sl.parameterCount() != 0Description
TRUEevaluated 1289 times by 506 tests
Evaluated 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
  • ...
FALSEevaluated 18696 times by 505 tests
Evaluated 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
  • ...
1289-19985
176 || sl.returnType() != QMetaType::Void || sl.methodType() != QMetaMethod::Slot)
sl.returnType(...MetaType::VoidDescription
TRUEnever evaluated
FALSEevaluated 18696 times by 505 tests
Evaluated 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
  • ...
sl.methodType(...taMethod::SlotDescription
TRUEnever evaluated
FALSEevaluated 18696 times by 505 tests
Evaluated 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-18696
177 return false;
executed 7115 times by 506 tests: return false;
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
  • ...
7115
178 const QByteArray name = sl.name();-
179 return !(name.isEmpty() || name.endsWith("_data")
executed 18696 times by 505 tests: return !(name.isEmpty() || name.endsWith("_data") || name == "initTestCase" || name == "cleanupTestCase" || name == "init" || name == "cleanup");
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
  • ...
18696
180 || name == "initTestCase" || name == "cleanupTestCase"
executed 18696 times by 505 tests: return !(name.isEmpty() || name.endsWith("_data") || name == "initTestCase" || name == "cleanupTestCase" || name == "init" || name == "cleanup");
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
  • ...
18696
181 || name == "init" || name == "cleanup");
executed 18696 times by 505 tests: return !(name.isEmpty() || name.endsWith("_data") || name == "initTestCase" || name == "cleanupTestCase" || name == "init" || name == "cleanup");
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
  • ...
18696
182}-
183-
184namespace QTest-
185{-
186 class WatchDog;-
187-
188 static QObject *currentTestObject = 0;-
189 static QString mainSourcePath;-
190-
191 class TestMethods {-
192 Q_DISABLE_COPY(TestMethods)-
193 public:-
194 typedef std::vector<QMetaMethod> MetaMethods;-
195-
196 explicit TestMethods(const QObject *o, const MetaMethods &m = MetaMethods());-
197-
198 void invokeTests(QObject *testObject) const;-
199-
200 static QMetaMethod findMethod(const QObject *obj, const char *signature);-
201-
202 private:-
203 bool invokeTest(int index, const char *data, WatchDog *watchDog) const;-
204 void invokeTestOnData(int index) const;-
205-
206 QMetaMethod m_initTestCaseMethod; // might not exist, check isValid().-
207 QMetaMethod m_initTestCaseDataMethod;-
208 QMetaMethod m_cleanupTestCaseMethod;-
209 QMetaMethod m_initMethod;-
210 QMetaMethod m_cleanupMethod;-
211-
212 MetaMethods m_methods;-
213 };-
214-
215 TestMethods::TestMethods(const QObject *o, const MetaMethods &m)-
216 : m_initTestCaseMethod(TestMethods::findMethod(o, "initTestCase()"))-
217 , m_initTestCaseDataMethod(TestMethods::findMethod(o, "initTestCase_data()"))-
218 , m_cleanupTestCaseMethod(TestMethods::findMethod(o, "cleanupTestCase()"))-
219 , m_initMethod(TestMethods::findMethod(o, "init()"))-
220 , m_cleanupMethod(TestMethods::findMethod(o, "cleanup()"))-
221 , m_methods(m)-
222 {-
223 if (m.empty()) {
m.empty()Description
TRUEevaluated 1281 times by 506 tests
Evaluated 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
  • ...
FALSEevaluated 39 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
39-1281
224 const QMetaObject *metaObject = o->metaObject();-
225 const int count = metaObject->methodCount();-
226 m_methods.reserve(count);-
227 for (int i = 0; i < count; ++i) {
i < countDescription
TRUEevaluated 25703 times by 506 tests
Evaluated 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
  • ...
FALSEevaluated 1281 times by 506 tests
Evaluated 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
  • ...
1281-25703
228 const QMetaMethod me = metaObject->method(i);-
229 if (isValidSlot(me))
isValidSlot(me)Description
TRUEevaluated 13376 times by 504 tests
Evaluated 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
  • ...
FALSEevaluated 12327 times by 506 tests
Evaluated 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
  • ...
12327-13376
230 m_methods.push_back(me);
executed 13376 times by 504 tests: m_methods.push_back(me);
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
  • ...
13376
231 }
executed 25703 times by 506 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
  • ...
25703
232 }
executed 1281 times by 506 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
  • ...
1281
233 }
executed 1320 times by 506 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
  • ...
1320
234-
235 QMetaMethod TestMethods::findMethod(const QObject *obj, const char *signature)-
236 {-
237 const QMetaObject *metaObject = obj->metaObject();-
238 const int funcIndex = metaObject->indexOfMethod(signature);-
239 return funcIndex >= 0 ? metaObject->method(funcIndex) : QMetaMethod();
executed 6664 times by 506 tests: return funcIndex >= 0 ? metaObject->method(funcIndex) : QMetaMethod();
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
  • ...
6664
240 }-
241-
242 static int keyDelay = -1;-
243 static int mouseDelay = -1;-
244 static int eventDelay = -1;-
245 static int timeout = -1;-
246 static bool noCrashHandler = false;-
247-
248/*! \internal-
249 Invoke a method of the object without generating warning if the method does not exist-
250 */-
251static void invokeMethod(QObject *obj, const char *methodName)-
252{-
253 const QMetaObject *metaObject = obj->metaObject();-
254 int funcIndex = metaObject->indexOfMethod(methodName);-
255 if (funcIndex >= 0) {
funcIndex >= 0Description
TRUEevaluated 4599 times by 328 tests
Evaluated 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
FALSEevaluated 8673 times by 469 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
4599-8673
256 QMetaMethod method = metaObject->method(funcIndex);-
257 method.invoke(obj, Qt::DirectConnection);-
258 }
executed 4599 times by 328 tests: end of block
Executed 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
4599
259}
executed 13272 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
13272
260-
261int defaultEventDelay()-
262{-
263 if (eventDelay == -1) {
eventDelay == -1Description
TRUEevaluated 72 times by 72 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialogButtonBox
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
FALSEevaluated 36 times by 36 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QLabel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • ...
36-72
264 const QByteArray env = qgetenv("QTEST_EVENT_DELAY");-
265 if (!env.isEmpty())
!env.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 72 times by 72 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialogButtonBox
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
0-72
266 eventDelay = atoi(env.constData());
never executed: eventDelay = atoi(env.constData());
0
267 else-
268 eventDelay = 0;
executed 72 times by 72 tests: eventDelay = 0;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialogButtonBox
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
72
269 }-
270 return eventDelay;
executed 108 times by 72 tests: return eventDelay;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialogButtonBox
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • ...
108
271}-
272-
273int Q_TESTLIB_EXPORT defaultMouseDelay()-
274{-
275 if (mouseDelay == -1) {
mouseDelay == -1Description
TRUEevaluated 50 times by 50 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGroupBox
  • tst_QGuiApplication
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • ...
FALSEevaluated 8776 times by 45 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGroupBox
  • tst_QGuiApplication
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QLabel
  • tst_QLineEdit
  • ...
50-8776
276 const QByteArray env = qgetenv("QTEST_MOUSEEVENT_DELAY");-
277 if (!env.isEmpty())
!env.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 50 times by 50 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGroupBox
  • tst_QGuiApplication
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • ...
0-50
278 mouseDelay = atoi(env.constData());
never executed: mouseDelay = atoi(env.constData());
0
279 else-
280 mouseDelay = defaultEventDelay();
executed 50 times by 50 tests: mouseDelay = defaultEventDelay();
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGroupBox
  • tst_QGuiApplication
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • ...
50
281 }-
282 return mouseDelay;
executed 8826 times by 50 tests: return mouseDelay;
Executed by:
  • tst_Gestures
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsView
  • tst_QGraphicsWidget
  • tst_QGroupBox
  • tst_QGuiApplication
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • ...
8826
283}-
284-
285int Q_TESTLIB_EXPORT defaultKeyDelay()-
286{-
287 if (keyDelay == -1) {
keyDelay == -1Description
TRUEevaluated 58 times by 58 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialogButtonBox
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • ...
FALSEevaluated 14546 times by 54 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsScene
  • tst_QGraphicsWidget
  • ...
58-14546
288 const QByteArray env = qgetenv("QTEST_KEYEVENT_DELAY");-
289 if (!env.isEmpty())
!env.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 58 times by 58 tests
Evaluated by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialogButtonBox
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • ...
0-58
290 keyDelay = atoi(env.constData());
never executed: keyDelay = atoi(env.constData());
0
291 else-
292 keyDelay = defaultEventDelay();
executed 58 times by 58 tests: keyDelay = defaultEventDelay();
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialogButtonBox
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • ...
58
293 }-
294 return keyDelay;
executed 14604 times by 58 tests: return keyDelay;
Executed by:
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QApplication
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QColorDialog
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDial
  • tst_QDialogButtonBox
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsItem
  • tst_QGraphicsProxyWidget
  • ...
14604
295}-
296-
297static int defaultTimeout()-
298{-
299 if (timeout == -1) {
timeout == -1Description
TRUEevaluated 1189 times by 501 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEevaluated 125421 times by 475 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • ...
1189-125421
300 bool ok = false;-
301 timeout = qEnvironmentVariableIntValue("QTEST_FUNCTION_TIMEOUT", &ok);-
302-
303 if (!ok || timeout <= 0)
!okDescription
TRUEevaluated 1189 times by 501 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEnever evaluated
timeout <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0-1189
304 timeout = 5*60*1000;
executed 1189 times by 501 tests: timeout = 5*60*1000;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
1189
305 }
executed 1189 times by 501 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
1189
306 return timeout;
executed 126610 times by 502 tests: return timeout;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
126610
307}-
308-
309Q_TESTLIB_EXPORT bool printAvailableFunctions = false;-
310Q_TESTLIB_EXPORT QStringList testFunctions;-
311Q_TESTLIB_EXPORT QStringList testTags;-
312-
313static void qPrintTestSlots(FILE *stream, const char *filter = 0)-
314{-
315 for (int i = 0; i < QTest::currentTestObject->metaObject()->methodCount(); ++i) {
i < QTest::cur...>methodCount()Description
TRUEnever evaluated
FALSEnever evaluated
0
316 QMetaMethod sl = QTest::currentTestObject->metaObject()->method(i);-
317 if (isValidSlot(sl)) {
isValidSlot(sl)Description
TRUEnever evaluated
FALSEnever evaluated
0
318 const QByteArray signature = sl.methodSignature();-
319 if (!filter || QString::fromLatin1(signature).contains(QLatin1String(filter), Qt::CaseInsensitive))
!filterDescription
TRUEnever evaluated
FALSEnever evaluated
QString::fromL...seInsensitive)Description
TRUEnever evaluated
FALSEnever evaluated
0
320 fprintf(stream, "%s\n", signature.constData());
never executed: fprintf(stream, "%s\n", signature.constData());
0
321 }
never executed: end of block
0
322 }
never executed: end of block
0
323}
never executed: end of block
0
324-
325static void qPrintDataTags(FILE *stream)-
326{-
327 // Avoid invoking the actual test functions, and also avoid printing irrelevant output:-
328 QTestLog::setPrintAvailableTagsMode();-
329-
330 // Get global data tags:-
331 QTestTable::globalTestTable();-
332 invokeMethod(QTest::currentTestObject, "initTestCase_data()");-
333 const QTestTable *gTable = QTestTable::globalTestTable();-
334-
335 const QMetaObject *currTestMetaObj = QTest::currentTestObject->metaObject();-
336-
337 // Process test functions:-
338 for (int i = 0; i < currTestMetaObj->methodCount(); ++i) {
i < currTestMe...>methodCount()Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
4-44
339 QMetaMethod tf = currTestMetaObj->method(i);-
340-
341 if (isValidSlot(tf)) {
isValidSlot(tf)Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
12-32
342-
343 // Retrieve local tags:-
344 QStringList localTags;-
345 QTestTable table;-
346 char *slot = qstrdup(tf.methodSignature().constData());-
347 slot[strlen(slot) - 2] = '\0';-
348 QByteArray member;-
349 member.resize(qstrlen(slot) + qstrlen("_data()") + 1);-
350 qsnprintf(member.data(), member.size(), "%s_data()", slot);-
351 invokeMethod(QTest::currentTestObject, member.constData());-
352 const int dataCount = table.dataCount();-
353 localTags.reserve(dataCount);-
354 for (int j = 0; j < dataCount; ++j)
j < dataCountDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
12-20
355 localTags << QLatin1String(table.testData(j)->dataTag());
executed 20 times by 1 test: localTags << QLatin1String(table.testData(j)->dataTag());
Executed by:
  • tst_selftests - unknown status
20
356-
357 // Print all tag combinations:-
358 if (gTable->dataCount() == 0) {
gTable->dataCount() == 0Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
6
359 if (localTags.count() == 0) {
localTags.count() == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
2-4
360 // No tags at all, so just print the test function:-
361 fprintf(stream, "%s %s\n", currTestMetaObj->className(), slot);-
362 } else {
executed 2 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
2
363 // Only local tags, so print each of them:-
364 for (int k = 0; k < localTags.size(); ++k)
k < localTags.size()Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
4-10
365 fprintf(
executed 10 times by 1 test: fprintf( stream, "%s %s %s\n", currTestMetaObj->className(), slot, localTags.at(k).toLatin1().data());
Executed by:
  • tst_selftests - unknown status
10
366 stream, "%s %s %s\n",
executed 10 times by 1 test: fprintf( stream, "%s %s %s\n", currTestMetaObj->className(), slot, localTags.at(k).toLatin1().data());
Executed by:
  • tst_selftests - unknown status
10
367 currTestMetaObj->className(), slot, localTags.at(k).toLatin1().data());
executed 10 times by 1 test: fprintf( stream, "%s %s %s\n", currTestMetaObj->className(), slot, localTags.at(k).toLatin1().data());
Executed by:
  • tst_selftests - unknown status
10
368 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
4
369 } else {-
370 for (int j = 0; j < gTable->dataCount(); ++j) {
j < gTable->dataCount()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
6-12
371 if (localTags.count() == 0) {
localTags.count() == 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
4-8
372 // Only global tags, so print the current one:-
373 fprintf(-
374 stream, "%s %s __global__ %s\n",-
375 currTestMetaObj->className(), slot, gTable->testData(j)->dataTag());-
376 } else {
executed 4 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
4
377 // Local and global tags, so print each of the local ones and-
378 // the current global one:-
379 for (int k = 0; k < localTags.size(); ++k)
k < localTags.size()Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
8-20
380 fprintf(
executed 20 times by 1 test: fprintf( stream, "%s %s %s __global__ %s\n", currTestMetaObj->className(), slot, localTags.at(k).toLatin1().data(), gTable->testData(j)->dataTag());
Executed by:
  • tst_selftests - unknown status
20
381 stream, "%s %s %s __global__ %s\n", currTestMetaObj->className(), slot,
executed 20 times by 1 test: fprintf( stream, "%s %s %s __global__ %s\n", currTestMetaObj->className(), slot, localTags.at(k).toLatin1().data(), gTable->testData(j)->dataTag());
Executed by:
  • tst_selftests - unknown status
20
382 localTags.at(k).toLatin1().data(), gTable->testData(j)->dataTag());
executed 20 times by 1 test: fprintf( stream, "%s %s %s __global__ %s\n", currTestMetaObj->className(), slot, localTags.at(k).toLatin1().data(), gTable->testData(j)->dataTag());
Executed by:
  • tst_selftests - unknown status
20
383 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
8
384 }-
385 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
6
386-
387 delete[] slot;-
388 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
12
389 }
executed 44 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
44
390}
executed 4 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
4
391-
392static int qToInt(char *str)-
393{-
394 char *pEnd;-
395 int l = (int)strtol(str, &pEnd, 10);-
396 if (*pEnd != 0) {
*pEnd != 0Description
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-21
397 fprintf(stderr, "Invalid numeric parameter: '%s'\n", str);-
398 exit(1);
never executed: exit(1);
0
399 }-
400 return l;
executed 21 times by 1 test: return l;
Executed by:
  • tst_selftests - unknown status
21
401}-
402-
403Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)-
404{-
405 QTestLog::LogMode logFormat = QTestLog::Plain;-
406 const char *logFilename = 0;-
407-
408 QTest::testFunctions.clear();-
409 QTest::testTags.clear();-
410-
411#if defined(Q_OS_MAC) && defined(HAVE_XCTEST)-
412 if (QXcodeTestLogger::canLogTestProgress())-
413 logFormat = QTestLog::XCTest;-
414#endif-
415-
416 const char *testOptions =-
417 " New-style logging options:\n"-
418 " -o filename,format : Output results to file in the specified format\n"-
419 " Use - to output to stdout\n"-
420 " Valid formats are:\n"-
421 " txt : Plain text\n"-
422 " csv : CSV format (suitable for benchmarks)\n"-
423 " xunitxml : XML XUnit document\n"-
424 " xml : XML document\n"-
425 " lightxml : A stream of XML tags\n"-
426 " teamcity : TeamCity format\n"-
427 "\n"-
428 " *** Multiple loggers can be specified, but at most one can log to stdout.\n"-
429 "\n"-
430 " Old-style logging options:\n"-
431 " -o filename : Write the output into file\n"-
432 " -txt : Output results in Plain Text\n"-
433 " -csv : Output results in a CSV format (suitable for benchmarks)\n"-
434 " -xunitxml : Output results as XML XUnit document\n"-
435 " -xml : Output results as XML document\n"-
436 " -lightxml : Output results as stream of XML tags\n"-
437 " -teamcity : Output results in TeamCity format\n"-
438 "\n"-
439 " *** If no output file is specified, stdout is assumed.\n"-
440 " *** If no output format is specified, -txt is assumed.\n"-
441 "\n"-
442 " Test log detail options:\n"-
443 " -silent : Log failures and fatal errors only\n"-
444 " -v1 : Log the start of each testfunction\n"-
445 " -v2 : Log each QVERIFY/QCOMPARE/QTEST (implies -v1)\n"-
446 " -vs : Log every signal emission and resulting slot invocations\n"-
447 "\n"-
448 " *** The -silent and -v1 options only affect plain text output.\n"-
449 "\n"-
450 " Testing options:\n"-
451 " -functions : Returns a list of current testfunctions\n"-
452 " -datatags : Returns a list of current data tags.\n"-
453 " A global data tag is preceded by ' __global__ '.\n"-
454 " -eventdelay ms : Set default delay for mouse and keyboard simulation to ms milliseconds\n"-
455 " -keydelay ms : Set default delay for keyboard simulation to ms milliseconds\n"-
456 " -mousedelay ms : Set default delay for mouse simulation to ms milliseconds\n"-
457 " -maxwarnings n : Sets the maximum amount of messages to output.\n"-
458 " 0 means unlimited, default: 2000\n"-
459 " -nocrashhandler : Disables the crash handler. Useful for debugging crashes.\n"-
460 "\n"-
461 " Benchmarking options:\n"-
462#ifdef QTESTLIB_USE_VALGRIND-
463 " -callgrind : Use callgrind to time benchmarks\n"-
464#endif-
465#ifdef QTESTLIB_USE_PERF_EVENTS-
466 " -perf : Use Linux perf events to time benchmarks\n"-
467 " -perfcounter name : Use the counter named 'name'\n"-
468 " -perfcounterlist : Lists the counters available\n"-
469#endif-
470#ifdef HAVE_TICK_COUNTER-
471 " -tickcounter : Use CPU tick counters to time benchmarks\n"-
472#endif-
473 " -eventcounter : Counts events received during benchmarks\n"-
474 " -minimumvalue n : Sets the minimum acceptable measurement value\n"-
475 " -minimumtotal n : Sets the minimum acceptable total for repeated executions of a test function\n"-
476 " -iterations n : Sets the number of accumulation iterations.\n"-
477 " -median n : Sets the number of median iterations.\n"-
478 " -vb : Print out verbose benchmarking information.\n";-
479-
480 for (int i = 1; i < argc; ++i) {
i < argcDescription
TRUEevaluated 1387 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 811 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
811-1387
481 if (strcmp(argv[i], "-help") == 0 || strcmp(argv[i], "--help") == 0
strcmp(argv[i], "-help") == 0Description
TRUEnever evaluated
FALSEevaluated 1387 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
strcmp(argv[i], "--help") == 0Description
TRUEnever evaluated
FALSEevaluated 1387 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-1387
482 || strcmp(argv[i], "/?") == 0) {
strcmp(argv[i], "/?") == 0Description
TRUEnever evaluated
FALSEevaluated 1387 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-1387
483 printf(" Usage: %s [options] [testfunction[:testdata]]...\n"-
484 " By default, all testfunctions will be run.\n\n"-
485 "%s", argv[0], testOptions);-
486-
487 if (qml) {
qmlDescription
TRUEnever evaluated
FALSEnever evaluated
0
488 printf ("\n"-
489 " QmlTest options:\n"-
490 " -import dir : Specify an import directory.\n"-
491 " -plugins dir : Specify a directory where to search for plugins.\n"-
492 " -input dir/file : Specify the root directory for test cases or a single test case file.\n"-
493 " -qtquick1 : Run with QtQuick 1 rather than QtQuick 2.\n"-
494 " -translation file : Specify the translation file.\n"-
495 );-
496 }
never executed: end of block
0
497-
498 printf("\n"-
499 " -help : This help\n");-
500 exit(0);
never executed: exit(0);
0
501 } else if (strcmp(argv[i], "-functions") == 0) {
strcmp(argv[i]...nctions") == 0Description
TRUEnever evaluated
FALSEevaluated 1387 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-1387
502 if (qml) {
qmlDescription
TRUEnever evaluated
FALSEnever evaluated
0
503 QTest::printAvailableFunctions = true;-
504 } else {
never executed: end of block
0
505 qPrintTestSlots(stdout);-
506 exit(0);
never executed: exit(0);
0
507 }-
508 } else if (strcmp(argv[i], "-datatags") == 0) {
strcmp(argv[i]...atatags") == 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 1383 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
4-1383
509 if (!qml) {
!qmlDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
0-4
510 qPrintDataTags(stdout);-
511 exit(0);
executed 4 times by 1 test: exit(0);
Executed by:
  • tst_selftests - unknown status
4
512 }-
513 } else if (strcmp(argv[i], "-txt") == 0) {
never executed: end of block
strcmp(argv[i], "-txt") == 0Description
TRUEnever evaluated
FALSEevaluated 1383 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-1383
514 logFormat = QTestLog::Plain;-
515 } else if (strcmp(argv[i], "-csv") == 0) {
never executed: end of block
strcmp(argv[i], "-csv") == 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 1379 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-1379
516 logFormat = QTestLog::CSV;-
517 } else if (strcmp(argv[i], "-xunitxml") == 0) {
executed 4 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
strcmp(argv[i]...unitxml") == 0Description
TRUEevaluated 62 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 1317 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
4-1317
518 logFormat = QTestLog::XunitXML;-
519 } else if (strcmp(argv[i], "-xml") == 0) {
executed 62 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
strcmp(argv[i], "-xml") == 0Description
TRUEevaluated 62 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 1255 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
62-1255
520 logFormat = QTestLog::XML;-
521 } else if (strcmp(argv[i], "-lightxml") == 0) {
executed 62 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
strcmp(argv[i]...ightxml") == 0Description
TRUEevaluated 62 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 1193 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
62-1193
522 logFormat = QTestLog::LightXML;-
523 } else if (strcmp(argv[i], "-teamcity") == 0) {
executed 62 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
strcmp(argv[i]...eamcity") == 0Description
TRUEevaluated 58 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 1135 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
58-1135
524 logFormat = QTestLog::TeamCity;-
525 } else if (strcmp(argv[i], "-silent") == 0) {
executed 58 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
strcmp(argv[i]...-silent") == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 1133 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
2-1133
526 QTestLog::setVerboseLevel(-1);-
527 } else if (strcmp(argv[i], "-v1") == 0) {
executed 2 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
strcmp(argv[i], "-v1") == 0Description
TRUEevaluated 25 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 1108 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
2-1108
528 QTestLog::setVerboseLevel(1);-
529 } else if (strcmp(argv[i], "-v2") == 0) {
executed 25 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
strcmp(argv[i], "-v2") == 0Description
TRUEevaluated 50 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 1058 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
25-1058
530 QTestLog::setVerboseLevel(2);-
531 } else if (strcmp(argv[i], "-vs") == 0) {
executed 50 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
strcmp(argv[i], "-vs") == 0Description
TRUEnever evaluated
FALSEevaluated 1058 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-1058
532 QSignalDumper::startDump();-
533 } else if (strcmp(argv[i], "-o") == 0) {
never executed: end of block
strcmp(argv[i], "-o") == 0Description
TRUEevaluated 900 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-900
534 if (i + 1 >= argc) {
i + 1 >= argcDescription
TRUEnever evaluated
FALSEevaluated 900 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-900
535 fprintf(stderr, "-o needs an extra parameter specifying the filename and optional format\n");-
536 exit(1);
never executed: exit(1);
0
537 }-
538 ++i;-
539 // Do we have the old or new style -o option?-
540 char *filename = new char[strlen(argv[i])+1];-
541 char *format = new char[strlen(argv[i])+1];-
542 if (sscanf(argv[i], "%[^,],%s", filename, format) == 1) {
sscanf(argv[i]..., format) == 1Description
TRUEevaluated 154 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 746 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
154-746
543 // Old-style-
544 logFilename = argv[i];-
545 } else {
executed 154 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
154
546 // New-style-
547 if (strcmp(format, "txt") == 0)
strcmp(format, "txt") == 0Description
TRUEevaluated 256 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 490 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
256-490
548 logFormat = QTestLog::Plain;
executed 256 times by 1 test: logFormat = QTestLog::Plain;
Executed by:
  • tst_selftests - unknown status
256
549 else if (strcmp(format, "csv") == 0)
strcmp(format, "csv") == 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 486 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
4-486
550 logFormat = QTestLog::CSV;
executed 4 times by 1 test: logFormat = QTestLog::CSV;
Executed by:
  • tst_selftests - unknown status
4
551 else if (strcmp(format, "lightxml") == 0)
strcmp(format,...ightxml") == 0Description
TRUEevaluated 123 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 363 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
123-363
552 logFormat = QTestLog::LightXML;
executed 123 times by 1 test: logFormat = QTestLog::LightXML;
Executed by:
  • tst_selftests - unknown status
123
553 else if (strcmp(format, "xml") == 0)
strcmp(format, "xml") == 0Description
TRUEevaluated 122 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 241 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
122-241
554 logFormat = QTestLog::XML;
executed 122 times by 1 test: logFormat = QTestLog::XML;
Executed by:
  • tst_selftests - unknown status
122
555 else if (strcmp(format, "xunitxml") == 0)
strcmp(format,...unitxml") == 0Description
TRUEevaluated 153 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 88 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
88-153
556 logFormat = QTestLog::XunitXML;
executed 153 times by 1 test: logFormat = QTestLog::XunitXML;
Executed by:
  • tst_selftests - unknown status
153
557 else if (strcmp(format, "teamcity") == 0)
strcmp(format,...eamcity") == 0Description
TRUEevaluated 88 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
0-88
558 logFormat = QTestLog::TeamCity;
executed 88 times by 1 test: logFormat = QTestLog::TeamCity;
Executed by:
  • tst_selftests - unknown status
88
559 else {-
560 fprintf(stderr, "output format must be one of txt, csv, lightxml, xml, teamcity or xunitxml\n");-
561 exit(1);
never executed: exit(1);
0
562 }-
563 if (strcmp(filename, "-") == 0 && QTestLog::loggerUsingStdout()) {
strcmp(filename, "-") == 0Description
TRUEevaluated 291 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 455 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
QTestLog::loggerUsingStdout()Description
TRUEnever evaluated
FALSEevaluated 291 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-455
564 fprintf(stderr, "only one logger can log to stdout\n");-
565 exit(1);
never executed: exit(1);
0
566 }-
567 QTestLog::addLogger(logFormat, filename);-
568 }
executed 746 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
746
569 delete [] filename;-
570 delete [] format;-
571 } else if (strcmp(argv[i], "-eventdelay") == 0) {
executed 900 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
strcmp(argv[i]...ntdelay") == 0Description
TRUEnever evaluated
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-900
572 if (i + 1 >= argc) {
i + 1 >= argcDescription
TRUEnever evaluated
FALSEnever evaluated
0
573 fprintf(stderr, "-eventdelay needs an extra parameter to indicate the delay(ms)\n");-
574 exit(1);
never executed: exit(1);
0
575 } else {-
576 QTest::eventDelay = qToInt(argv[++i]);-
577 }
never executed: end of block
0
578 } else if (strcmp(argv[i], "-keydelay") == 0) {
strcmp(argv[i]...eydelay") == 0Description
TRUEnever evaluated
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-158
579 if (i + 1 >= argc) {
i + 1 >= argcDescription
TRUEnever evaluated
FALSEnever evaluated
0
580 fprintf(stderr, "-keydelay needs an extra parameter to indicate the delay(ms)\n");-
581 exit(1);
never executed: exit(1);
0
582 } else {-
583 QTest::keyDelay = qToInt(argv[++i]);-
584 }
never executed: end of block
0
585 } else if (strcmp(argv[i], "-mousedelay") == 0) {
strcmp(argv[i]...sedelay") == 0Description
TRUEnever evaluated
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-158
586 if (i + 1 >= argc) {
i + 1 >= argcDescription
TRUEnever evaluated
FALSEnever evaluated
0
587 fprintf(stderr, "-mousedelay needs an extra parameter to indicate the delay(ms)\n");-
588 exit(1);
never executed: exit(1);
0
589 } else {-
590 QTest::mouseDelay = qToInt(argv[++i]);-
591 }
never executed: end of block
0
592 } else if (strcmp(argv[i], "-maxwarnings") == 0) {
strcmp(argv[i]...arnings") == 0Description
TRUEnever evaluated
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-158
593 if (i + 1 >= argc) {
i + 1 >= argcDescription
TRUEnever evaluated
FALSEnever evaluated
0
594 fprintf(stderr, "-maxwarnings needs an extra parameter with the amount of warnings\n");-
595 exit(1);
never executed: exit(1);
0
596 } else {-
597 QTestLog::setMaxWarnings(qToInt(argv[++i]));-
598 }
never executed: end of block
0
599 } else if (strcmp(argv[i], "-nocrashhandler") == 0) {
strcmp(argv[i]...handler") == 0Description
TRUEnever evaluated
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-158
600 QTest::noCrashHandler = true;-
601#ifdef QTESTLIB_USE_VALGRIND-
602 } else if (strcmp(argv[i], "-callgrind") == 0) {
never executed: end of block
strcmp(argv[i]...llgrind") == 0Description
TRUEnever evaluated
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-158
603 if (QBenchmarkValgrindUtils::haveValgrind())
QBenchmarkValg...haveValgrind()Description
TRUEnever evaluated
FALSEnever evaluated
0
604 if (QFileInfo(QDir::currentPath()).isWritable()) {
QFileInfo(QDir...).isWritable()Description
TRUEnever evaluated
FALSEnever evaluated
0
605 QBenchmarkGlobalData::current->setMode(QBenchmarkGlobalData::CallgrindParentProcess);-
606 } else {
never executed: end of block
0
607 fprintf(stderr, "WARNING: Current directory not writable. Using the walltime measurer.\n");-
608 }
never executed: end of block
0
609 else {-
610 fprintf(stderr, "WARNING: Valgrind not found or too old. Make sure it is installed and in your path. "-
611 "Using the walltime measurer.\n");-
612 }
never executed: end of block
0
613 } else if (strcmp(argv[i], "-callgrindchild") == 0) { // "private" option
strcmp(argv[i]...ndchild") == 0Description
TRUEnever evaluated
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-158
614 QBenchmarkGlobalData::current->setMode(QBenchmarkGlobalData::CallgrindChildProcess);-
615 QBenchmarkGlobalData::current->callgrindOutFileBase =-
616 QBenchmarkValgrindUtils::outFileBase();-
617#endif-
618#ifdef QTESTLIB_USE_PERF_EVENTS-
619 } else if (strcmp(argv[i], "-perf") == 0) {
never executed: end of block
strcmp(argv[i], "-perf") == 0Description
TRUEnever evaluated
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-158
620 if (QBenchmarkPerfEventsMeasurer::isAvailable()) {
QBenchmarkPerf...:isAvailable()Description
TRUEnever evaluated
FALSEnever evaluated
0
621 // perf available-
622 QBenchmarkGlobalData::current->setMode(QBenchmarkGlobalData::PerfCounter);-
623 } else {
never executed: end of block
0
624 fprintf(stderr, "WARNING: Linux perf events not available. Using the walltime measurer.\n");-
625 }
never executed: end of block
0
626 } else if (strcmp(argv[i], "-perfcounter") == 0) {
strcmp(argv[i]...counter") == 0Description
TRUEnever evaluated
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-158
627 if (i + 1 >= argc) {
i + 1 >= argcDescription
TRUEnever evaluated
FALSEnever evaluated
0
628 fprintf(stderr, "-perfcounter needs an extra parameter with the name of the counter\n");-
629 exit(1);
never executed: exit(1);
0
630 } else {-
631 QBenchmarkPerfEventsMeasurer::setCounter(argv[++i]);-
632 }
never executed: end of block
0
633 } else if (strcmp(argv[i], "-perfcounterlist") == 0) {
strcmp(argv[i]...terlist") == 0Description
TRUEnever evaluated
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-158
634 QBenchmarkPerfEventsMeasurer::listCounters();-
635 exit(0);
never executed: exit(0);
0
636#endif-
637#ifdef HAVE_TICK_COUNTER-
638 } else if (strcmp(argv[i], "-tickcounter") == 0) {
strcmp(argv[i]...counter") == 0Description
TRUEnever evaluated
FALSEevaluated 158 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-158
639 QBenchmarkGlobalData::current->setMode(QBenchmarkGlobalData::TickCounter);-
640#endif-
641 } else if (strcmp(argv[i], "-eventcounter") == 0) {
never executed: end of block
strcmp(argv[i]...counter") == 0Description
TRUEevaluated 73 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 85 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-85
642 QBenchmarkGlobalData::current->setMode(QBenchmarkGlobalData::EventCounter);-
643 } else if (strcmp(argv[i], "-minimumvalue") == 0) {
executed 73 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
strcmp(argv[i]...umvalue") == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 83 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
2-83
644 if (i + 1 >= argc) {
i + 1 >= argcDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-2
645 fprintf(stderr, "-minimumvalue needs an extra parameter to indicate the minimum time(ms)\n");-
646 exit(1);
never executed: exit(1);
0
647 } else {-
648 QBenchmarkGlobalData::current->walltimeMinimum = qToInt(argv[++i]);-
649 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
2
650 } else if (strcmp(argv[i], "-minimumtotal") == 0) {
strcmp(argv[i]...umtotal") == 0Description
TRUEnever evaluated
FALSEevaluated 83 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-83
651 if (i + 1 >= argc) {
i + 1 >= argcDescription
TRUEnever evaluated
FALSEnever evaluated
0
652 fprintf(stderr, "-minimumtotal needs an extra parameter to indicate the minimum total measurement\n");-
653 exit(1);
never executed: exit(1);
0
654 } else {-
655 QBenchmarkGlobalData::current->minimumTotal = qToInt(argv[++i]);-
656 }
never executed: end of block
0
657 } else if (strcmp(argv[i], "-iterations") == 0) {
strcmp(argv[i]...rations") == 0Description
TRUEevaluated 19 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
19-64
658 if (i + 1 >= argc) {
i + 1 >= argcDescription
TRUEnever evaluated
FALSEevaluated 19 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-19
659 fprintf(stderr, "-iterations needs an extra parameter to indicate the number of iterations\n");-
660 exit(1);
never executed: exit(1);
0
661 } else {-
662 QBenchmarkGlobalData::current->iterationCount = qToInt(argv[++i]);-
663 }
executed 19 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
19
664 } else if (strcmp(argv[i], "-median") == 0) {
strcmp(argv[i]...-median") == 0Description
TRUEnever evaluated
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-64
665 if (i + 1 >= argc) {
i + 1 >= argcDescription
TRUEnever evaluated
FALSEnever evaluated
0
666 fprintf(stderr, "-median needs an extra parameter to indicate the number of median iterations\n");-
667 exit(1);
never executed: exit(1);
0
668 } else {-
669 QBenchmarkGlobalData::current->medianIterationCount = qToInt(argv[++i]);-
670 }
never executed: end of block
0
671-
672 } else if (strcmp(argv[i], "-vb") == 0) {
strcmp(argv[i], "-vb") == 0Description
TRUEnever evaluated
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-64
673 QBenchmarkGlobalData::current->verboseOutput = true;-
674#if defined(Q_OS_WINRT)-
675 } else if (strncmp(argv[i], "-ServerName:", 12) == 0 ||-
676 strncmp(argv[i], "-qdevel", 7) == 0) {-
677 continue;-
678#elif defined(Q_OS_MAC) && defined(HAVE_XCTEST)-
679 } else if (int skip = QXcodeTestLogger::parseCommandLineArgument(argv[i])) {-
680 i += (skip - 1); // Eating argv[i] with a continue counts towards skips-
681 continue;-
682#endif-
683 } else if (argv[i][0] == '-') {
never executed: end of block
argv[i][0] == '-'Description
TRUEnever evaluated
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-64
684 fprintf(stderr, "Unknown option: '%s'\n\n%s", argv[i], testOptions);-
685 if (qml) {
qmlDescription
TRUEnever evaluated
FALSEnever evaluated
0
686 fprintf(stderr, "\nqmltest related options:\n"-
687 " -import : Specify an import directory.\n"-
688 " -plugins : Specify a directory where to search for plugins.\n"-
689 " -input : Specify the root directory for test cases.\n"-
690 " -qtquick1 : Run with QtQuick 1 rather than QtQuick 2.\n"-
691 );-
692 }
never executed: end of block
0
693-
694 fprintf(stderr, "\n"-
695 " -help : This help\n");-
696 exit(1);
never executed: exit(1);
0
697 } else {-
698 // We can't check the availability of test functions until-
699 // we load the QML files. So just store the data for now.-
700 int colon = -1;-
701 int offset;-
702 for (offset = 0; *(argv[i]+offset); ++offset) {
*(argv[i]+offset)Description
TRUEevaluated 865 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 37 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
37-865
703 if (*(argv[i]+offset) == ':') {
*(argv[i]+offset) == ':'Description
TRUEevaluated 27 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 838 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
27-838
704 if (*(argv[i]+offset+1) == ':') {
*(argv[i]+offset+1) == ':'Description
TRUEnever evaluated
FALSEevaluated 27 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-27
705 // "::" is used as a test name separator.-
706 // e.g. "ClickTests::test_click:row1".-
707 ++offset;-
708 } else {
never executed: end of block
0
709 colon = offset;-
710 break;
executed 27 times by 1 test: break;
Executed by:
  • tst_selftests - unknown status
27
711 }-
712 }-
713 }
executed 838 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
838
714 if (colon == -1) {
colon == -1Description
TRUEevaluated 37 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 27 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
27-37
715 QTest::testFunctions += QString::fromLatin1(argv[i]);-
716 QTest::testTags += QString();-
717 } else {
executed 37 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
37
718 QTest::testFunctions +=-
719 QString::fromLatin1(argv[i], colon);-
720 QTest::testTags +=-
721 QString::fromLatin1(argv[i] + colon + 1);-
722 }
executed 27 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
27
723 }-
724 }-
725-
726 bool installedTestCoverage = installCoverageTool(QTestResult::currentAppName(), QTestResult::currentTestObjectName());-
727 QTestLog::setInstalledTestCoverage(installedTestCoverage);-
728-
729 // If no loggers were created by the long version of the -o command-line-
730 // option, create a logger using whatever filename and format were-
731 // set using the old-style command-line options.-
732 if (QTestLog::loggerCount() == 0)
QTestLog::loggerCount() == 0Description
TRUEevaluated 847 times by 506 tests
Evaluated 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
  • ...
FALSEevaluated 473 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
473-847
733 QTestLog::addLogger(logFormat, logFilename);
executed 847 times by 506 tests: QTestLog::addLogger(logFormat, logFilename);
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
  • ...
847
734}
executed 1320 times by 506 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
  • ...
1320
735-
736QBenchmarkResult qMedian(const QVector<QBenchmarkResult> &container)-
737{-
738 const int count = container.count();-
739 if (count == 0)
count == 0Description
TRUEnever evaluated
FALSEevaluated 282 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
0-282
740 return QBenchmarkResult();
never executed: return QBenchmarkResult();
0
741-
742 if (count == 1)
count == 1Description
TRUEevaluated 282 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
FALSEnever evaluated
0-282
743 return container.front();
executed 282 times by 2 tests: return container.front();
Executed by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
282
744-
745 QVector<QBenchmarkResult> containerCopy = container;-
746 std::sort(containerCopy.begin(), containerCopy.end());-
747-
748 const int middle = count / 2;-
749-
750 // ### handle even-sized containers here by doing an aritmetic mean of the two middle items.-
751 return containerCopy.at(middle);
never executed: return containerCopy.at(middle);
0
752}-
753-
754struct QTestDataSetter-
755{-
756 QTestDataSetter(QTestData *data)-
757 {-
758 QTestResult::setCurrentTestData(data);-
759 }
executed 126610 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
126610
760 ~QTestDataSetter()-
761 {-
762 QTestResult::setCurrentTestData(0);-
763 }
executed 126553 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
126553
764};-
765-
766namespace {-
767-
768qreal addResult(qreal current, const QBenchmarkResult& r)-
769{-
770 return current + r.value;
never executed: return current + r.value;
0
771}-
772-
773}-
774-
775void TestMethods::invokeTestOnData(int index) const-
776{-
777 /* Benchmarking: for each median iteration*/-
778-
779 bool isBenchmark = false;-
780 int i = (QBenchmarkGlobalData::current->measurer->needsWarmupIteration()) ? -1 : 0;
(QBenchmarkGlo...upIteration())Description
TRUEevaluated 126116 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEevaluated 494 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
494-126116
781-
782 QVector<QBenchmarkResult> results;-
783 bool minimumTotalReached = false;-
784 do {-
785 QBenchmarkTestMethodData::current->beginDataRun();-
786-
787 /* Benchmarking: for each accumulation iteration*/-
788 bool invokeOk;-
789 do {-
790 if (m_initMethod.isValid())
m_initMethod.isValid()Description
TRUEevaluated 14076 times by 100 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDBusServiceWatcher
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
FALSEevaluated 112554 times by 403 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • ...
14076-112554
791 m_initMethod.invoke(QTest::currentTestObject, Qt::DirectConnection);
executed 14076 times by 100 tests: m_initMethod.invoke(QTest::currentTestObject, Qt::DirectConnection);
Executed by:
  • tst_LargeFile
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDBusServiceWatcher
  • tst_QDateTime
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • ...
14076
792 if (QTestResult::skipCurrentTest() || QTestResult::currentTestFailed())
QTestResult::skipCurrentTest()Description
TRUEevaluated 75 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 126555 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
QTestResult::c...ntTestFailed()Description
TRUEevaluated 75 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 126480 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
75-126555
793 break;
executed 150 times by 1 test: break;
Executed by:
  • tst_selftests - unknown status
150
794-
795 QBenchmarkTestMethodData::current->result = QBenchmarkResult();-
796 QBenchmarkTestMethodData::current->resultAccepted = false;-
797-
798 QBenchmarkGlobalData::current->context.tag =-
799 QLatin1String(-
800 QTestResult::currentDataTag()-
801 ? QTestResult::currentDataTag() : "");-
802-
803 invokeOk = m_methods[index].invoke(QTest::currentTestObject, Qt::DirectConnection);-
804 if (!invokeOk)
!invokeOkDescription
TRUEnever evaluated
FALSEevaluated 126398 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
0-126398
805 QTestResult::addFailure("Unable to execute slot", __FILE__, __LINE__);
never executed: QTestResult::addFailure("Unable to execute slot", __FILE__, 805);
0
806-
807 isBenchmark = QBenchmarkTestMethodData::current->isBenchmark();-
808-
809 QTestResult::finishedCurrentTestData();-
810-
811 if (m_cleanupMethod.isValid())
m_cleanupMethod.isValid()Description
TRUEevaluated 32781 times by 104 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QCheckBox
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusThreading
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QFormLayout
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • ...
FALSEevaluated 93617 times by 399 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAction
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAtomicInteger_char
  • ...
32781-93617
812 m_cleanupMethod.invoke(QTest::currentTestObject, Qt::DirectConnection);
executed 32781 times by 104 tests: m_cleanupMethod.invoke(QTest::currentTestObject, Qt::DirectConnection);
Executed by:
  • tst_LargeFile
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QActionGroup
  • tst_QApplication
  • tst_QBoxLayout
  • tst_QCheckBox
  • tst_QDBusAbstractInterface
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusThreading
  • tst_QDateTimeEdit
  • tst_QDesktopWidget
  • tst_QDialog
  • tst_QFile
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFocusEvent
  • tst_QFontDialog
  • tst_QFormLayout
  • tst_QFtp
  • tst_QGraphicsProxyWidget
  • ...
32781
813-
814 // If the test isn't a benchmark, finalize the result after cleanup() has finished.-
815 if (!isBenchmark)
!isBenchmarkDescription
TRUEevaluated 125978 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEevaluated 420 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
420-125978
816 QTestResult::finishedCurrentTestDataCleanup();
executed 125978 times by 502 tests: QTestResult::finishedCurrentTestDataCleanup();
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
125978
817-
818 // If this test method has a benchmark, repeat until all measurements are-
819 // acceptable.-
820 // The QBENCHMARK macro increases the number of iterations for each run until-
821 // this happens.-
822 } while (invokeOk && isBenchmark
executed 126398 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
invokeOkDescription
TRUEevaluated 126398 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEnever evaluated
isBenchmarkDescription
TRUEevaluated 420 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
FALSEevaluated 125978 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
0-126398
823 && QBenchmarkTestMethodData::current->resultsAccepted() == false
QBenchmarkTest...ted() == falseDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 408 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
12-408
824 && !QTestResult::skipCurrentTest() && !QTestResult::currentTestFailed());
!QTestResult::...pCurrentTest()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
!QTestResult::...ntTestFailed()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
0-12
825-
826 QBenchmarkTestMethodData::current->endDataRun();-
827 if (!QTestResult::skipCurrentTest() && !QTestResult::currentTestFailed()) {
!QTestResult::...pCurrentTest()Description
TRUEevaluated 125366 times by 501 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEevaluated 1170 times by 52 tests
Evaluated by:
  • tst_Compiler
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QByteArray
  • 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_QIODevice
  • tst_QImageReader
  • tst_QItemView
  • tst_QLockFile
  • tst_QMainWindow
  • tst_QMdiArea
  • tst_QMdiSubWindow
  • ...
!QTestResult::...ntTestFailed()Description
TRUEevaluated 125198 times by 501 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEevaluated 168 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
168-125366
828 if (i > -1) // iteration -1 is the warmup iteration.
i > -1Description
TRUEevaluated 380 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
FALSEevaluated 124818 times by 501 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
380-124818
829 results.append(QBenchmarkTestMethodData::current->result);
executed 380 times by 2 tests: results.append(QBenchmarkTestMethodData::current->result);
Executed by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
380
830-
831 if (isBenchmark && QBenchmarkGlobalData::current->verboseOutput) {
isBenchmarkDescription
TRUEevaluated 290 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
FALSEevaluated 124908 times by 501 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
QBenchmarkGlob...>verboseOutputDescription
TRUEnever evaluated
FALSEevaluated 290 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
0-124908
832 if (i == -1) {
i == -1Description
TRUEnever evaluated
FALSEnever evaluated
0
833 QTestLog::info(qPrintable(-
834 QString::fromLatin1("warmup stage result : %1")-
835 .arg(QBenchmarkTestMethodData::current->result.value)), 0, 0);-
836 } else {
never executed: end of block
0
837 QTestLog::info(qPrintable(-
838 QString::fromLatin1("accumulation stage result: %1")-
839 .arg(QBenchmarkTestMethodData::current->result.value)), 0, 0);-
840 }
never executed: end of block
0
841 }-
842 }
executed 125198 times by 501 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
125198
843-
844 // Verify if the minimum total measurement is reached, if it was specified:-
845 if (QBenchmarkGlobalData::current->minimumTotal == -1) {
QBenchmarkGlob...mumTotal == -1Description
TRUEevaluated 126536 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEnever evaluated
0-126536
846 minimumTotalReached = true;-
847 } else {
executed 126536 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
126536
848 const qreal total = std::accumulate(results.begin(), results.end(), 0.0, addResult);-
849 minimumTotalReached = (total >= QBenchmarkGlobalData::current->minimumTotal);-
850 }
never executed: end of block
0
851 } while (isBenchmark
isBenchmarkDescription
TRUEevaluated 408 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
FALSEevaluated 126128 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
408-126128
852 && ((++i < QBenchmarkGlobalData::current->adjustMedianIterationCount()) || !minimumTotalReached)
(++i < QBenchm...rationCount())Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QByteDataBuffer
FALSEevaluated 400 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
!minimumTotalReachedDescription
TRUEnever evaluated
FALSEevaluated 400 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
0-400
853 && !QTestResult::skipCurrentTest() && !QTestResult::currentTestFailed());
!QTestResult::...pCurrentTest()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QByteDataBuffer
FALSEnever evaluated
!QTestResult::...ntTestFailed()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QByteDataBuffer
FALSEnever evaluated
0-8
854-
855 // If the test is a benchmark, finalize the result after all iterations have finished.-
856 if (isBenchmark) {
isBenchmarkDescription
TRUEevaluated 400 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
FALSEevaluated 126128 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
400-126128
857 bool testPassed = !QTestResult::skipCurrentTest() && !QTestResult::currentTestFailed();
!QTestResult::...pCurrentTest()Description
TRUEevaluated 375 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
FALSEevaluated 25 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
!QTestResult::...ntTestFailed()Description
TRUEevaluated 282 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
FALSEevaluated 93 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
25-375
858 QTestResult::finishedCurrentTestDataCleanup();-
859 // Only report benchmark figures if the test passed-
860 if (testPassed && QBenchmarkTestMethodData::current->resultsAccepted())
testPassedDescription
TRUEevaluated 282 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
FALSEevaluated 118 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
QBenchmarkTest...ultsAccepted()Description
TRUEevaluated 282 times by 2 tests
Evaluated by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
FALSEnever evaluated
0-282
861 QTestLog::addBenchmarkResult(qMedian(results));
executed 282 times by 2 tests: QTestLog::addBenchmarkResult(qMedian(results));
Executed by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
282
862 }
executed 400 times by 2 tests: end of block
Executed by:
  • tst_QByteDataBuffer
  • tst_selftests - unknown status
400
863}
executed 126528 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
126528
864-
865class WatchDog : public QThread-
866{-
867public:-
868 WatchDog()-
869 {-
870 QMutexLocker locker(&mutex);-
871 timeout.store(-1);-
872 start();-
873 waitCondition.wait(&mutex);-
874 }
executed 1320 times by 506 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
  • ...
1320
875 ~WatchDog() {-
876 {-
877 QMutexLocker locker(&mutex);-
878 timeout.store(0);-
879 waitCondition.wakeAll();-
880 }-
881 wait();-
882 }
executed 1263 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
1263
883-
884 void beginTest() {-
885 QMutexLocker locker(&mutex);-
886 timeout.store(defaultTimeout());-
887 waitCondition.wakeAll();-
888 }
executed 126610 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
126610
889-
890 void testFinished() {-
891 QMutexLocker locker(&mutex);-
892 timeout.store(-1);-
893 waitCondition.wakeAll();-
894 }
executed 126528 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
126528
895-
896 void run() {-
897 QMutexLocker locker(&mutex);-
898 waitCondition.wakeAll();-
899 while (1) {-
900 int t = timeout.load();-
901 if (!t)
!tDescription
TRUEevaluated 1263 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
FALSEevaluated 221322 times by 508 tests
Evaluated 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
  • ...
1263-221322
902 break;
executed 1263 times by 508 tests: break;
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
1263
903 if (Q_UNLIKELY(!waitCondition.wait(&mutex, t))) {
__builtin_expe...x, t)), false)Description
TRUEnever evaluated
FALSEevaluated 221265 times by 901 tests
Evaluated by:
  • tst_Collections
  • tst_Gestures
  • 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_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
0-221265
904 stackTrace();-
905 qFatal("Test function timed out");-
906 }
never executed: end of block
0
907 }
executed 221265 times by 901 tests: end of block
Executed by:
  • tst_Collections
  • tst_Gestures
  • 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_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • ...
221265
908 }
executed 1263 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
1263
909-
910private:-
911 QBasicAtomicInt timeout;-
912 QMutex mutex;-
913 QWaitCondition waitCondition;-
914};-
915-
916-
917/*!-
918 \internal-
919-
920 Call slot_data(), init(), slot(), cleanup(), init(), slot(), cleanup(), ...-
921 If data is set then it is the only test that is performed-
922-
923 If the function was successfully called, true is returned, otherwise-
924 false.-
925 */-
926bool TestMethods::invokeTest(int index, const char *data, WatchDog *watchDog) const-
927{-
928 QBenchmarkTestMethodData benchmarkData;-
929 QBenchmarkTestMethodData::current = &benchmarkData;-
930-
931 const QByteArray &name = m_methods[index].name();-
932 QBenchmarkGlobalData::current->context.slotName = QLatin1String(name) + QLatin1String("()");-
933-
934 char member[512];-
935 QTestTable table;-
936-
937 QTestResult::setCurrentTestFunction(name.constData());-
938-
939 const QTestTable *gTable = QTestTable::globalTestTable();-
940 const int globalDataCount = gTable->dataCount();-
941 int curGlobalDataIndex = 0;-
942-
943 /* For each test function that has a *_data() table/function, do: */-
944 do {-
945 if (!gTable->isEmpty())
!gTable->isEmpty()Description
TRUEevaluated 1197 times by 15 tests
Evaluated 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
FALSEevaluated 12891 times by 488 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
1197-12891
946 QTestResult::setCurrentGlobalTestData(gTable->testData(curGlobalDataIndex));
executed 1197 times by 15 tests: QTestResult::setCurrentGlobalTestData(gTable->testData(curGlobalDataIndex));
Executed 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
1197
947-
948 if (curGlobalDataIndex == 0) {
curGlobalDataIndex == 0Description
TRUEevaluated 13256 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEevaluated 832 times by 12 tests
Evaluated by:
  • tst_QDBusLocalCalls
  • tst_QDnsLookup
  • tst_QFtp
  • tst_QHostInfo
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Utf8
  • tst_qdbusxml2cpp
  • tst_selftests - unknown status
832-13256
949 qsnprintf(member, 512, "%s_data()", name.constData());-
950 invokeMethod(QTest::currentTestObject, member);-
951 }
executed 13256 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
13256
952-
953 bool foundFunction = false;-
954 if (!QTestResult::skipCurrentTest()) {
!QTestResult::...pCurrentTest()Description
TRUEevaluated 13851 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEevaluated 237 times by 12 tests
Evaluated by:
  • tst_QCssParser
  • tst_QFtp
  • tst_QMimeDatabase
  • tst_QNetworkSession
  • tst_QSqlDatabase
  • tst_QSqlQuery
  • tst_QSqlTableModel
  • tst_QSslSocket
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QTextScriptEngine
  • tst_selftests - unknown status
237-13851
955 int curDataIndex = 0;-
956 const int dataCount = table.dataCount();-
957-
958 // Data tag requested but none available?-
959 if (data && !dataCount) {
dataDescription
TRUEevaluated 27 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 13824 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
!dataCountDescription
TRUEnever evaluated
FALSEevaluated 27 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-13824
960 // Let empty data tag through.-
961 if (!*data)
!*dataDescription
TRUEnever evaluated
FALSEnever evaluated
0
962 data = 0;
never executed: data = 0;
0
963 else {-
964 fprintf(stderr, "Unknown testdata for function %s(): '%s'\n", name.constData(), data);-
965 fprintf(stderr, "Function has no testdata.\n");-
966 return false;
never executed: return false;
0
967 }-
968 }-
969-
970 /* For each entry in the data table, do: */-
971 do {-
972 QTestResult::setSkipCurrentTest(false);-
973 QTestResult::setBlacklistCurrentTest(false);-
974 if (!data || !qstrcmp(data, table.testData(curDataIndex)->dataTag())) {
!dataDescription
TRUEevaluated 126583 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEevaluated 29 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
!qstrcmp(data,...x)->dataTag())Description
TRUEevaluated 27 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
2-126583
975 foundFunction = true;-
976-
977 QTestPrivate::checkBlackLists(name.constData(), dataCount ? table.testData(curDataIndex)->dataTag() : 0);-
978-
979 QTestDataSetter s(curDataIndex >= dataCount ? static_cast<QTestData *>(0)-
980 : table.testData(curDataIndex));-
981-
982 if (watchDog)
watchDogDescription
TRUEevaluated 126610 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEnever evaluated
0-126610
983 watchDog->beginTest();
executed 126610 times by 502 tests: watchDog->beginTest();
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
126610
984 invokeTestOnData(index);-
985 if (watchDog)
watchDogDescription
TRUEevaluated 126528 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEnever evaluated
0-126528
986 watchDog->testFinished();
executed 126528 times by 502 tests: watchDog->testFinished();
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
126528
987-
988 if (data)
dataDescription
TRUEevaluated 27 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 126501 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
27-126501
989 break;
executed 27 times by 1 test: break;
Executed by:
  • tst_selftests - unknown status
27
990 }
executed 126501 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
126501
991 ++curDataIndex;-
992 } while (curDataIndex < dataCount);
executed 126503 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
curDataIndex < dataCountDescription
TRUEevaluated 112761 times by 324 tests
Evaluated 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
FALSEevaluated 13742 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
13742-126503
993 }
executed 13769 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
13769
994-
995 if (data && !foundFunction) {
dataDescription
TRUEevaluated 27 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 13979 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
!foundFunctionDescription
TRUEnever evaluated
FALSEevaluated 27 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-13979
996 fprintf(stderr, "Unknown testdata for function %s: '%s()'\n", name.constData(), data);-
997 fprintf(stderr, "Available testdata:\n");-
998 for (int i = 0; i < table.dataCount(); ++i)
i < table.dataCount()Description
TRUEnever evaluated
FALSEnever evaluated
0
999 fprintf(stderr, "%s\n", table.testData(i)->dataTag());
never executed: fprintf(stderr, "%s\n", table.testData(i)->dataTag());
0
1000 return false;
never executed: return false;
0
1001 }-
1002-
1003 QTestResult::setCurrentGlobalTestData(0);-
1004 ++curGlobalDataIndex;-
1005 } while (curGlobalDataIndex < globalDataCount);
executed 14006 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
curGlobalDataI...lobalDataCountDescription
TRUEevaluated 832 times by 12 tests
Evaluated by:
  • tst_QDBusLocalCalls
  • tst_QDnsLookup
  • tst_QFtp
  • tst_QHostInfo
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_Utf8
  • tst_qdbusxml2cpp
  • tst_selftests - unknown status
FALSEevaluated 13174 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
832-14006
1006-
1007 QTestResult::finishedCurrentTestFunction();-
1008 QTestResult::setSkipCurrentTest(false);-
1009 QTestResult::setBlacklistCurrentTest(false);-
1010 QTestResult::setCurrentTestData(0);-
1011-
1012 return true;
executed 13174 times by 502 tests: return true;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
13174
1013}-
1014-
1015void *fetchData(QTestData *data, const char *tagName, int typeId)-
1016{-
1017 QTEST_ASSERT(typeId);
never executed: qt_assert("typeId",__FILE__,1017);
!(typeId)Description
TRUEnever evaluated
FALSEevaluated 431987 times by 330 tests
Evaluated 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
0-431987
1018 QTEST_ASSERT_X(data, "QTest::fetchData()", "Test data requested, but no testdata available.");
never executed: qt_assert_x("QTest::fetchData()", "Test data requested, but no testdata available.",__FILE__,1018);
!(data)Description
TRUEnever evaluated
FALSEevaluated 431987 times by 330 tests
Evaluated 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
0-431987
1019 QTEST_ASSERT(data->parent());
never executed: qt_assert("data->parent()",__FILE__,1019);
!(data->parent())Description
TRUEnever evaluated
FALSEevaluated 431987 times by 330 tests
Evaluated 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
0-431987
1020-
1021 int idx = data->parent()->indexOf(tagName);-
1022-
1023 if (Q_UNLIKELY(idx == -1 || idx >= data->dataCount())) {
__builtin_expe...unt()), false)Description
TRUEevaluated 25 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 431962 times by 330 tests
Evaluated 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
25-431962
1024 qFatal("QFETCH: Requested testdata '%s' not available, check your _data function.",-
1025 tagName);-
1026 }
never executed: end of block
0
1027-
1028 if (Q_UNLIKELY(typeId != data->parent()->elementTypeId(idx))) {
__builtin_expe...(idx)), false)Description
TRUEnever evaluated
FALSEevaluated 431962 times by 330 tests
Evaluated 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
0-431962
1029 qFatal("Requested type '%s' does not match available type '%s'.",-
1030 QMetaType::typeName(typeId),-
1031 QMetaType::typeName(data->parent()->elementTypeId(idx)));-
1032 }
never executed: end of block
0
1033-
1034 return data->data(idx);
executed 431962 times by 330 tests: return data->data(idx);
Executed 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
431962
1035}-
1036-
1037/*!-
1038 \fn char* QTest::toHexRepresentation(const char *ba, int length)-
1039-
1040 Returns a pointer to a string that is the string \a ba represented-
1041 as a space-separated sequence of hex characters. If the input is-
1042 considered too long, it is truncated. A trucation is indicated in-
1043 the returned string as an ellipsis at the end.-
1044-
1045 \a length is the length of the string \a ba.-
1046 */-
1047char *toHexRepresentation(const char *ba, int length)-
1048{-
1049 if (length == 0)
length == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1050 return qstrdup("");
never executed: return qstrdup("");
0
1051-
1052 /* We output at maximum about maxLen characters in order to avoid-
1053 * running out of memory and flooding things when the byte array-
1054 * is large.-
1055 *-
1056 * maxLen can't be for example 200 because Qt Test is sprinkled with fixed-
1057 * size char arrays.-
1058 * */-
1059 const int maxLen = 50;-
1060 const int len = qMin(maxLen, length);-
1061 char *result = 0;-
1062-
1063 if (length > maxLen) {
length > maxLenDescription
TRUEnever evaluated
FALSEnever evaluated
0
1064 const int size = len * 3 + 4;-
1065 result = new char[size];-
1066-
1067 char *const forElipsis = result + size - 5;-
1068 forElipsis[0] = ' ';-
1069 forElipsis[1] = '.';-
1070 forElipsis[2] = '.';-
1071 forElipsis[3] = '.';-
1072 result[size - 1] = '\0';-
1073 }
never executed: end of block
0
1074 else {-
1075 const int size = len * 3;-
1076 result = new char[size];-
1077 result[size - 1] = '\0';-
1078 }
never executed: end of block
0
1079-
1080 int i = 0;-
1081 int o = 0;-
1082-
1083 while (true) {-
1084 const char at = ba[i];-
1085-
1086 result[o] = toHexUpper(at >> 4);-
1087 ++o;-
1088 result[o] = toHexUpper(at);-
1089-
1090 ++i;-
1091 ++o;-
1092 if (i == len)
i == lenDescription
TRUEnever evaluated
FALSEnever evaluated
0
1093 break;
never executed: break;
0
1094 else {-
1095 result[o] = ' ';-
1096 ++o;-
1097 }
never executed: end of block
0
1098 }-
1099-
1100 return result;
never executed: return result;
0
1101}-
1102-
1103/*!-
1104 \internal-
1105 Returns the same QByteArray but with only the ASCII characters still shown;-
1106 everything else is replaced with \c {\xHH}.-
1107*/-
1108char *toPrettyCString(const char *p, int length)-
1109{-
1110 bool trimmed = false;-
1111 QScopedArrayPointer<char> buffer(new char[256]);-
1112 const char *end = p + length;-
1113 char *dst = buffer.data();-
1114-
1115 bool lastWasHexEscape = false;-
1116 *dst++ = '"';-
1117 for ( ; p != end; ++p) {
p != endDescription
TRUEevaluated 486728 times by 91 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_LargeFile
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteArrayList
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QDateTime
  • tst_QEasingCurve
  • tst_QFile
  • tst_QFileSystemEntry
  • tst_QFtp
  • tst_QGetPutEnv
  • ...
FALSEevaluated 10490 times by 92 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteArrayList
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDBusMarshall
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QDateTime
  • tst_QEasingCurve
  • tst_QFile
  • tst_QFileSystemEntry
  • tst_QFtp
  • tst_QGetPutEnv
  • ...
10490-486728
1118 // we can add:-
1119 // 1 byte: a single character-
1120 // 2 bytes: a simple escape sequence (\n)-
1121 // 3 bytes: "" and a character-
1122 // 4 bytes: an hex escape sequence (\xHH)-
1123 if (dst - buffer.data() > 246) {
dst - buffer.data() > 246Description
TRUEevaluated 1698 times by 23 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QDataStream
  • tst_QFile
  • tst_QFtp
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QSslSocket
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextCodec
  • tst_QUdpSocket
  • tst_Spdy
  • tst_rcc
  • tst_selftests - unknown status
FALSEevaluated 485030 times by 91 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_LargeFile
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteArrayList
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QDateTime
  • tst_QEasingCurve
  • tst_QFile
  • tst_QFileSystemEntry
  • tst_QFtp
  • tst_QGetPutEnv
  • ...
1698-485030
1124 // plus the the quote, the three dots and NUL, it's 255 in the worst case-
1125 trimmed = true;-
1126 break;
executed 1698 times by 23 tests: break;
Executed by:
  • tst_LargeFile
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QDataStream
  • tst_QFile
  • tst_QFtp
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QSslSocket
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextCodec
  • tst_QUdpSocket
  • tst_Spdy
  • tst_rcc
  • tst_selftests - unknown status
1698
1127 }-
1128-
1129 // check if we need to insert "" to break an hex escape sequence-
1130 if (Q_UNLIKELY(lastWasHexEscape)) {
__builtin_expe...scape), false)Description
TRUEevaluated 45154 times by 31 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QFile
  • tst_QHeaderView
  • tst_QListWidget
  • tst_QMessageAuthenticationCode
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QSettings
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QString
  • tst_QStringBuilder1
  • tst_QStringBuilder2
  • tst_QStringBuilder3
  • tst_QStringBuilder4
  • tst_QTableWidget
  • ...
FALSEevaluated 439876 times by 91 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_LargeFile
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteArrayList
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QDateTime
  • tst_QEasingCurve
  • tst_QFile
  • tst_QFileSystemEntry
  • tst_QFtp
  • tst_QGetPutEnv
  • ...
45154-439876
1131 if (fromHex(*p) != -1) {
fromHex(*p) != -1Description
TRUEevaluated 3244 times by 17 tests
Evaluated by:
  • tst_LargeFile
  • tst_QByteArray
  • tst_QCryptographicHash
  • tst_QHeaderView
  • tst_QListWidget
  • tst_QMessageAuthenticationCode
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTableWidget
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_QUuid
  • tst_Utf8
FALSEevaluated 41910 times by 30 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QFile
  • tst_QHeaderView
  • tst_QListWidget
  • tst_QMessageAuthenticationCode
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QSettings
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QString
  • tst_QStringBuilder1
  • tst_QStringBuilder2
  • tst_QStringBuilder3
  • tst_QStringBuilder4
  • tst_QTableWidget
  • ...
3244-41910
1132 // yes, insert it-
1133 *dst++ = '"';-
1134 *dst++ = '"';-
1135 }
executed 3244 times by 17 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QByteArray
  • tst_QCryptographicHash
  • tst_QHeaderView
  • tst_QListWidget
  • tst_QMessageAuthenticationCode
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTableWidget
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_QUuid
  • tst_Utf8
3244
1136 lastWasHexEscape = false;-
1137 }
executed 45154 times by 31 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QFile
  • tst_QHeaderView
  • tst_QListWidget
  • tst_QMessageAuthenticationCode
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QSettings
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QString
  • tst_QStringBuilder1
  • tst_QStringBuilder2
  • tst_QStringBuilder3
  • tst_QStringBuilder4
  • tst_QTableWidget
  • ...
45154
1138-
1139 if (*p < 0x7f && *p >= 0x20 && *p != '\\' && *p != '"') {
*p < 0x7fDescription
TRUEevaluated 482038 times by 91 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_LargeFile
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteArrayList
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QDateTime
  • tst_QEasingCurve
  • tst_QFile
  • tst_QFileSystemEntry
  • tst_QFtp
  • tst_QGetPutEnv
  • ...
FALSEevaluated 2992 times by 12 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QFile
  • tst_QNetworkReply
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QString
  • tst_QTextCodec
*p >= 0x20Description
TRUEevaluated 428662 times by 90 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_LargeFile
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteArrayList
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDateTime
  • tst_QEasingCurve
  • tst_QFile
  • tst_QFileSystemEntry
  • tst_QFtp
  • tst_QGetPutEnv
  • tst_QHeaderView
  • ...
FALSEevaluated 53376 times by 46 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QFile
  • tst_QFtp
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QListWidget
  • tst_QMessageAuthenticationCode
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QProcess
  • tst_QResourceEngine
  • tst_QRingBuffer
  • tst_QSettings
  • tst_QSocketNotifier
  • tst_QSocks5SocketEngine
  • tst_QSqlQuery
  • ...
*p != '\\'Description
TRUEevaluated 427994 times by 90 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_LargeFile
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteArrayList
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDateTime
  • tst_QEasingCurve
  • tst_QFile
  • tst_QFileSystemEntry
  • tst_QFtp
  • tst_QGetPutEnv
  • tst_QHeaderView
  • ...
FALSEevaluated 668 times by 13 tests
Evaluated by:
  • tst_LargeFile
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTextCodec
*p != '"'Description
TRUEevaluated 426848 times by 90 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_LargeFile
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteArrayList
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDateTime
  • tst_QEasingCurve
  • tst_QFile
  • tst_QFileSystemEntry
  • tst_QFtp
  • tst_QGetPutEnv
  • tst_QHeaderView
  • ...
FALSEevaluated 1146 times by 17 tests
Evaluated by:
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QFile
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTextCodec
  • tst_QVariant
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmake
  • tst_rcc
668-482038
1140 *dst++ = *p;-
1141 continue;
executed 426848 times by 90 tests: continue;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_LargeFile
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteArrayList
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDateTime
  • tst_QEasingCurve
  • tst_QFile
  • tst_QFileSystemEntry
  • tst_QFtp
  • tst_QGetPutEnv
  • tst_QHeaderView
  • ...
426848
1142 }-
1143-
1144 // write as an escape sequence-
1145 // this means we may advance dst to buffer.data() + 247 or 250-
1146 *dst++ = '\\';-
1147 switch (*p) {-
1148 case 0x5c:
executed 668 times by 13 tests: case 0x5c:
Executed by:
  • tst_LargeFile
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTextCodec
668
1149 case 0x22:
executed 1146 times by 17 tests: case 0x22:
Executed by:
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QFile
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTextCodec
  • tst_QVariant
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmake
  • tst_rcc
1146
1150 *dst++ = uchar(*p);-
1151 break;
executed 1814 times by 19 tests: break;
Executed by:
  • tst_LargeFile
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QFile
  • tst_QLocalSocket
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTextCodec
  • tst_QVariant
  • tst_QXmlStream
  • tst_Spdy
  • tst_qmake
  • tst_rcc
1814
1152 case 0x8:
executed 290 times by 12 tests: case 0x8:
Executed by:
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QFile
  • tst_QMessageAuthenticationCode
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTextCodec
  • tst_QVariant
290
1153 *dst++ = 'b';-
1154 break;
executed 290 times by 12 tests: break;
Executed by:
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QFile
  • tst_QMessageAuthenticationCode
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTextCodec
  • tst_QVariant
290
1155 case 0xc:
executed 310 times by 13 tests: case 0xc:
Executed by:
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QFile
  • tst_QMessageAuthenticationCode
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTextCodec
  • tst_QVariant
310
1156 *dst++ = 'f';-
1157 break;
executed 310 times by 13 tests: break;
Executed by:
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QFile
  • tst_QMessageAuthenticationCode
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTextCodec
  • tst_QVariant
310
1158 case 0xa:
executed 7458 times by 34 tests: case 0xa:
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QFile
  • tst_QFtp
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QListWidget
  • tst_QMessageAuthenticationCode
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QProcess
  • tst_QResourceEngine
  • tst_QRingBuffer
  • tst_QSettings
  • tst_QSocks5SocketEngine
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QSslSocket
  • tst_QString
  • tst_QTableWidget
  • ...
7458
1159 *dst++ = 'n';-
1160 break;
executed 7458 times by 34 tests: break;
Executed by:
  • tst_QAbstractFileEngine
  • tst_QAbstractNetworkCache
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QFile
  • tst_QFtp
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QListWidget
  • tst_QMessageAuthenticationCode
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QProcess
  • tst_QResourceEngine
  • tst_QRingBuffer
  • tst_QSettings
  • tst_QSocks5SocketEngine
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QSslSocket
  • tst_QString
  • tst_QTableWidget
  • ...
7458
1161 case 0xd:
executed 930 times by 15 tests: case 0xd:
Executed by:
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QFile
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSocks5SocketEngine
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QSslSocket
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextCodec
  • tst_QVariant
930
1162 *dst++ = 'r';-
1163 break;
executed 930 times by 15 tests: break;
Executed by:
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QFile
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSocks5SocketEngine
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QSslSocket
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextCodec
  • tst_QVariant
930
1164 case 0x9:
executed 872 times by 13 tests: case 0x9:
Executed by:
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTextCodec
  • tst_QVariant
872
1165 *dst++ = 't';-
1166 break;
executed 872 times by 13 tests: break;
Executed by:
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QFile
  • tst_QNetworkReply
  • tst_QRingBuffer
  • tst_QSettings
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QTextCodec
  • tst_QVariant
872
1167 default:
executed 46508 times by 32 tests: default:
Executed by:
  • tst_LargeFile
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QFile
  • tst_QHeaderView
  • tst_QListWidget
  • tst_QMessageAuthenticationCode
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QSettings
  • tst_QSocketNotifier
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QString
  • tst_QStringBuilder1
  • tst_QStringBuilder2
  • tst_QStringBuilder3
  • tst_QStringBuilder4
  • ...
46508
1168 // print as hex escape-
1169 *dst++ = 'x';-
1170 *dst++ = toHexUpper(uchar(*p) >> 4);-
1171 *dst++ = toHexUpper(uchar(*p));-
1172 lastWasHexEscape = true;-
1173 break;
executed 46508 times by 32 tests: break;
Executed by:
  • tst_LargeFile
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QFile
  • tst_QHeaderView
  • tst_QListWidget
  • tst_QMessageAuthenticationCode
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QSettings
  • tst_QSocketNotifier
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QString
  • tst_QStringBuilder1
  • tst_QStringBuilder2
  • tst_QStringBuilder3
  • tst_QStringBuilder4
  • ...
46508
1174 }-
1175 }-
1176-
1177 *dst++ = '"';-
1178 if (trimmed) {
trimmedDescription
TRUEevaluated 1698 times by 23 tests
Evaluated by:
  • tst_LargeFile
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QDataStream
  • tst_QFile
  • tst_QFtp
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QSslSocket
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextCodec
  • tst_QUdpSocket
  • tst_Spdy
  • tst_rcc
  • tst_selftests - unknown status
FALSEevaluated 10490 times by 92 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteArrayList
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDBusMarshall
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QDateTime
  • tst_QEasingCurve
  • tst_QFile
  • tst_QFileSystemEntry
  • tst_QFtp
  • tst_QGetPutEnv
  • ...
1698-10490
1179 *dst++ = '.';-
1180 *dst++ = '.';-
1181 *dst++ = '.';-
1182 }
executed 1698 times by 23 tests: end of block
Executed by:
  • tst_LargeFile
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QDataStream
  • tst_QFile
  • tst_QFtp
  • tst_QHeaderView
  • tst_QIODevice
  • tst_QNetworkReply
  • tst_QPrinter
  • tst_QRingBuffer
  • tst_QSslCertificate
  • tst_QSslKey
  • tst_QSslSocket
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextCodec
  • tst_QUdpSocket
  • tst_Spdy
  • tst_rcc
  • tst_selftests - unknown status
1698
1183 *dst++ = '\0';-
1184 return buffer.take();
executed 12188 times by 94 tests: return buffer.take();
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_LargeFile
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAsn1Element
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteArrayList
  • tst_QByteDataBuffer
  • tst_QCryptographicHash
  • tst_QDBusMarshall
  • tst_QDBusMetaObject
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDataUrl
  • tst_QDateTime
  • tst_QEasingCurve
  • tst_QFile
  • tst_QFileSystemEntry
  • tst_QFtp
  • ...
12188
1185}-
1186-
1187/*!-
1188 \internal-
1189 Returns the same QString but with only the ASCII characters still shown;-
1190 everything else is replaced with \c {\uXXXX}.-
1191-
1192 Similar to QDebug::putString().-
1193*/-
1194char *toPrettyUnicode(const ushort *p, int length)-
1195{-
1196 // keep it simple for the vast majority of cases-
1197 bool trimmed = false;-
1198 QScopedArrayPointer<char> buffer(new char[256]);-
1199 const ushort *end = p + length;-
1200 char *dst = buffer.data();-
1201-
1202 *dst++ = '"';-
1203 for ( ; p != end; ++p) {
p != endDescription
TRUEevaluated 3520188 times by 253 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QByteArray
  • tst_QChar
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColor
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
FALSEevaluated 193693 times by 257 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QChar
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColor
  • tst_QComboBox
  • tst_QCommandLineParser
  • ...
193693-3520188
1204 if (dst - buffer.data() > 245) {
dst - buffer.data() > 245Description
TRUEevaluated 4399 times by 19 tests
Evaluated by:
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QHeaderView
  • tst_QImageReader
  • tst_QLineEdit
  • tst_QProcessEnvironment
  • tst_QSslCertificate
  • tst_QString
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextPieceTable
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qdbuscpp2xml
  • tst_uic
FALSEevaluated 3515789 times by 253 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QByteArray
  • tst_QChar
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColor
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • ...
4399-3515789
1205 // plus the the quote, the three dots and NUL, it's 250, 251 or 255-
1206 trimmed = true;-
1207 break;
executed 4399 times by 19 tests: break;
Executed by:
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QHeaderView
  • tst_QImageReader
  • tst_QLineEdit
  • tst_QProcessEnvironment
  • tst_QSslCertificate
  • tst_QString
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextPieceTable
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qdbuscpp2xml
  • tst_uic
4399
1208 }-
1209-
1210 if (*p < 0x7f && *p >= 0x20 && *p != '\\' && *p != '"') {
*p < 0x7fDescription
TRUEevaluated 3506869 times by 252 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QByteArray
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColor
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • ...
FALSEevaluated 8920 times by 44 tests
Evaluated by:
  • tst_QChar
  • tst_QComplexText
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemWatcher
  • tst_QFontMetrics
  • tst_QImageReader
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QKeySequence
  • tst_QLineEdit
  • tst_QPlainTextEdit
  • tst_QProgressBar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QSpinBox
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QString
  • tst_QStringBuilder1
  • tst_QStringBuilder2
  • ...
*p >= 0x20Description
TRUEevaluated 3484005 times by 252 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QByteArray
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColor
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • ...
FALSEevaluated 22864 times by 44 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCheckBox
  • tst_QCommandLineParser
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QGraphicsItem
  • tst_QHeaderView
  • tst_QImage
  • tst_QImageReader
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMimeData
  • tst_QNetworkRequest
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • ...
*p != '\\'Description
TRUEevaluated 3483073 times by 252 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QByteArray
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColor
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • ...
FALSEevaluated 932 times by 15 tests
Evaluated by:
  • tst_QDataStream
  • tst_QDebug
  • tst_QDir
  • tst_QImageReader
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QString
  • tst_QUrl
  • tst_QUrlQuery
  • tst_QXmlSimpleReader
  • tst_qmakelib
*p != '"'Description
TRUEevaluated 3430061 times by 252 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QByteArray
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColor
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • ...
FALSEevaluated 53012 times by 19 tests
Evaluated by:
  • tst_QComplexText
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QImageReader
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QMetaType
  • tst_QNetworkReply
  • tst_QTextDocument
  • tst_QTextList
  • tst_QTextPieceTable
  • tst_QUrl
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qmakelib
932-3506869
1211 *dst++ = *p;-
1212 continue;
executed 3430061 times by 252 tests: continue;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QByteArray
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColor
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QComplexText
  • ...
3430061
1213 }-
1214-
1215 // write as an escape sequence-
1216 // this means we may advance dst to buffer.data() + 246 or 250-
1217 *dst++ = '\\';-
1218 switch (*p) {-
1219 case 0x22:
executed 53012 times by 19 tests: case 0x22:
Executed by:
  • tst_QComplexText
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QImageReader
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QMetaType
  • tst_QNetworkReply
  • tst_QTextDocument
  • tst_QTextList
  • tst_QTextPieceTable
  • tst_QUrl
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Selftests
  • tst_qdbuscpp2xml
  • tst_qmakelib
53012
1220 case 0x5c:
executed 932 times by 15 tests: case 0x5c:
Executed by:
  • tst_QDataStream
  • tst_QDebug
  • tst_QDir
  • tst_QImageReader
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QString
  • tst_QUrl
  • tst_QUrlQuery
  • tst_QXmlSimpleReader
  • tst_qmakelib
932
1221 *dst++ = uchar(*p);-
1222 break;
executed 53944 times by 26 tests: break;
Executed by:
  • tst_QComplexText
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QDir
  • tst_QImageReader
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QMetaType
  • tst_QNetworkReply
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QString
  • tst_QTextDocument
  • tst_QTextList
  • tst_QTextPieceTable
  • tst_QUrl
  • tst_QUrlQuery
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_Selftests
  • tst_qdbuscpp2xml
  • ...
53944
1223 case 0x8:
executed 2 times by 1 test: case 0x8:
Executed by:
  • tst_QSettings
2
1224 *dst++ = 'b';-
1225 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_QSettings
2
1226 case 0xc:
executed 18 times by 3 tests: case 0xc:
Executed by:
  • tst_QTextPieceTable
  • tst_QVariant
  • tst_QXmlSimpleReader
18
1227 *dst++ = 'f';-
1228 break;
executed 18 times by 3 tests: break;
Executed by:
  • tst_QTextPieceTable
  • tst_QVariant
  • tst_QXmlSimpleReader
18
1229 case 0xa:
executed 21838 times by 38 tests: case 0xa:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCheckBox
  • tst_QCommandLineParser
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QHeaderView
  • tst_QImage
  • tst_QImageReader
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMimeData
  • tst_QNetworkRequest
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QSocks5SocketEngine
  • tst_QSslCertificate
  • tst_QString
  • ...
21838
1230 *dst++ = 'n';-
1231 break;
executed 21838 times by 38 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QAccessibility
  • tst_QCheckBox
  • tst_QCommandLineParser
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QHeaderView
  • tst_QImage
  • tst_QImageReader
  • tst_QItemDelegate
  • tst_QLabel
  • tst_QLineEdit
  • tst_QMimeData
  • tst_QNetworkRequest
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QSocks5SocketEngine
  • tst_QSslCertificate
  • tst_QString
  • ...
21838
1232 case 0xd:
executed 80 times by 7 tests: case 0xd:
Executed by:
  • tst_QSocks5SocketEngine
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QVariant
80
1233 *dst++ = 'r';-
1234 break;
executed 80 times by 7 tests: break;
Executed by:
  • tst_QSocks5SocketEngine
  • tst_QString
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUrl
  • tst_QUrlInternal
  • tst_QVariant
80
1235 case 0x9:
executed 154 times by 7 tests: case 0x9:
Executed by:
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDebug
  • tst_QGraphicsItem
  • tst_QSettings
  • tst_QString
  • tst_QUrl
154
1236 *dst++ = 't';-
1237 break;
executed 154 times by 7 tests: break;
Executed by:
  • tst_QDataStream
  • tst_QDataWidgetMapper
  • tst_QDebug
  • tst_QGraphicsItem
  • tst_QSettings
  • tst_QString
  • tst_QUrl
154
1238 default:
executed 9692 times by 45 tests: default:
Executed by:
  • tst_QChar
  • tst_QComplexText
  • tst_QDataStream
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemWatcher
  • tst_QFontMetrics
  • tst_QImageReader
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QKeySequence
  • tst_QLineEdit
  • tst_QPlainTextEdit
  • tst_QProgressBar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QSpinBox
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QString
  • tst_QStringBuilder1
  • ...
9692
1239 *dst++ = 'u';-
1240 *dst++ = toHexUpper(*p >> 12);-
1241 *dst++ = toHexUpper(*p >> 8);-
1242 *dst++ = toHexUpper(*p >> 4);-
1243 *dst++ = toHexUpper(*p);-
1244 }
executed 9692 times by 45 tests: end of block
Executed by:
  • tst_QChar
  • tst_QComplexText
  • tst_QDataStream
  • tst_QDebug
  • tst_QDnsLookup
  • tst_QDoubleSpinBox
  • tst_QFileDialog2
  • tst_QFileSystemWatcher
  • tst_QFontMetrics
  • tst_QImageReader
  • tst_QIntValidator
  • tst_QItemDelegate
  • tst_QKeySequence
  • tst_QLineEdit
  • tst_QPlainTextEdit
  • tst_QProgressBar
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • tst_QSettings
  • tst_QSpinBox
  • tst_QSqlQuery
  • tst_QSslCertificate
  • tst_QString
  • tst_QStringBuilder1
  • ...
9692
1245 }-
1246-
1247 *dst++ = '"';-
1248 if (trimmed) {
trimmedDescription
TRUEevaluated 4399 times by 19 tests
Evaluated by:
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QHeaderView
  • tst_QImageReader
  • tst_QLineEdit
  • tst_QProcessEnvironment
  • tst_QSslCertificate
  • tst_QString
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextPieceTable
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qdbuscpp2xml
  • tst_uic
FALSEevaluated 193693 times by 257 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QChar
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColor
  • tst_QComboBox
  • tst_QCommandLineParser
  • ...
4399-193693
1249 *dst++ = '.';-
1250 *dst++ = '.';-
1251 *dst++ = '.';-
1252 }
executed 4399 times by 19 tests: end of block
Executed by:
  • tst_QDBusMarshall
  • tst_QDBusXmlParser
  • tst_QDataStream
  • tst_QDebug
  • tst_QFile
  • tst_QFileInfo
  • tst_QHeaderView
  • tst_QImageReader
  • tst_QLineEdit
  • tst_QProcessEnvironment
  • tst_QSslCertificate
  • tst_QString
  • tst_QTextCodec
  • tst_QTextDocument
  • tst_QTextPieceTable
  • tst_QXmlSimpleReader
  • tst_QXmlStream
  • tst_qdbuscpp2xml
  • tst_uic
4399
1253 *dst++ = '\0';-
1254 return buffer.take();
executed 198092 times by 259 tests: return buffer.take();
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QAlgorithms
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAuthenticator
  • tst_QBitArray
  • tst_QButtonGroup
  • tst_QByteArray
  • tst_QChar
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColor
  • tst_QComboBox
  • tst_QCommandLineParser
  • ...
198092
1255}-
1256-
1257static bool debuggerPresent()-
1258{-
1259#if defined(Q_OS_LINUX)-
1260 int fd = open("/proc/self/status", O_RDONLY);-
1261 if (fd == -1)
fd == -1Description
TRUEnever evaluated
FALSEevaluated 1320 times by 506 tests
Evaluated 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-1320
1262 return false;
never executed: return false;
0
1263 char buffer[2048];-
1264 ssize_t size = read(fd, buffer, sizeof(buffer) - 1);-
1265 if (size == -1) {
size == -1Description
TRUEnever evaluated
FALSEevaluated 1320 times by 506 tests
Evaluated 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-1320
1266 close(fd);-
1267 return false;
never executed: return false;
0
1268 }-
1269 buffer[size] = 0;-
1270 const char tracerPidToken[] = "\nTracerPid:";-
1271 char *tracerPid = strstr(buffer, tracerPidToken);-
1272 if (!tracerPid) {
!tracerPidDescription
TRUEnever evaluated
FALSEevaluated 1320 times by 506 tests
Evaluated 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-1320
1273 close(fd);-
1274 return false;
never executed: return false;
0
1275 }-
1276 tracerPid += sizeof(tracerPidToken);-
1277 long int pid = strtol(tracerPid, &tracerPid, 10);-
1278 close(fd);-
1279 return pid != 0;
executed 1320 times by 506 tests: return pid != 0;
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
  • ...
1320
1280#elif defined(Q_OS_WIN)-
1281 return IsDebuggerPresent();-
1282#else-
1283 // TODO-
1284 return false;-
1285#endif-
1286}-
1287-
1288void TestMethods::invokeTests(QObject *testObject) const-
1289{-
1290 const QMetaObject *metaObject = testObject->metaObject();-
1291 QTEST_ASSERT(metaObject);
never executed: qt_assert("metaObject",__FILE__,1291);
!(metaObject)Description
TRUEnever evaluated
FALSEevaluated 1320 times by 506 tests
Evaluated 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-1320
1292 QTestLog::startLogging();-
1293 QTestResult::setCurrentTestFunction("initTestCase");-
1294 QTestTable::globalTestTable();-
1295 if (m_initTestCaseDataMethod.isValid())
m_initTestCase...thod.isValid()Description
TRUEevaluated 85 times by 11 tests
Evaluated by:
  • tst_QFtp
  • tst_QSqlDriver
  • tst_QSqlRelationalTableModel
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_qdbusxml2cpp
  • tst_selftests - unknown status
FALSEevaluated 1235 times by 496 tests
Evaluated 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
  • ...
85-1235
1296 m_initTestCaseDataMethod.invoke(testObject, Qt::DirectConnection);
executed 85 times by 11 tests: m_initTestCaseDataMethod.invoke(testObject, Qt::DirectConnection);
Executed by:
  • tst_QFtp
  • tst_QSqlDriver
  • tst_QSqlRelationalTableModel
  • tst_QSslSocket
  • tst_QSslSocket_onDemandCertificates_member
  • tst_QSslSocket_onDemandCertificates_static
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QUdpSocket
  • tst_qdbusxml2cpp
  • tst_selftests - unknown status
85
1297-
1298 QScopedPointer<WatchDog> watchDog;-
1299 if (!debuggerPresent()
!debuggerPresent()Description
TRUEevaluated 1320 times by 506 tests
Evaluated 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
  • ...
FALSEnever evaluated
0-1320
1300#ifdef QTESTLIB_USE_VALGRIND-
1301 && QBenchmarkGlobalData::current->mode() != QBenchmarkGlobalData::CallgrindChildProcess
QBenchmarkGlob...ndChildProcessDescription
TRUEevaluated 1320 times by 506 tests
Evaluated 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
  • ...
FALSEnever evaluated
0-1320
1302#endif-
1303 ) {-
1304 watchDog.reset(new WatchDog);-
1305 }
executed 1320 times by 506 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
  • ...
1320
1306-
1307 if (!QTestResult::skipCurrentTest() && !QTest::currentTestFailed()) {
!QTestResult::...pCurrentTest()Description
TRUEevaluated 1295 times by 506 tests
Evaluated 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
  • ...
FALSEevaluated 25 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
!QTest::currentTestFailed()Description
TRUEevaluated 1270 times by 506 tests
Evaluated 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
  • ...
FALSEevaluated 25 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
25-1295
1308 if (m_initTestCaseMethod.isValid())
m_initTestCaseMethod.isValid()Description
TRUEevaluated 316 times by 190 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QAtomicInteger_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • tst_QAtomicInteger_qlonglong
  • tst_QAtomicInteger_qptrdiff
  • tst_QAtomicInteger_quintptr
  • tst_QAtomicInteger_qulonglong
  • tst_QAtomicInteger_schar
  • tst_QAtomicInteger_short
  • ...
FALSEevaluated 954 times by 317 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_ModelTest
  • tst_QAbstractAnimation
  • tst_QAbstractItemModel
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAtomicPointer
  • tst_QAuthenticator
  • tst_QBackingStore
  • tst_QBitArray
  • tst_QBoxLayout
  • tst_QBrush
  • tst_QBuffer
  • tst_QButtonGroup
  • ...
316-954
1309 m_initTestCaseMethod.invoke(testObject, Qt::DirectConnection);
executed 316 times by 190 tests: m_initTestCaseMethod.invoke(testObject, Qt::DirectConnection);
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QAtomicInteger_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • tst_QAtomicInteger_qlonglong
  • tst_QAtomicInteger_qptrdiff
  • tst_QAtomicInteger_quintptr
  • tst_QAtomicInteger_qulonglong
  • tst_QAtomicInteger_schar
  • tst_QAtomicInteger_short
  • ...
316
1310-
1311 // finishedCurrentTestDataCleanup() resets QTestResult::currentTestFailed(), so use a local copy.-
1312 const bool previousFailed = QTestResult::currentTestFailed();-
1313 QTestResult::finishedCurrentTestData();-
1314 QTestResult::finishedCurrentTestDataCleanup();-
1315 QTestResult::finishedCurrentTestFunction();-
1316-
1317 if (!QTestResult::skipCurrentTest() && !previousFailed) {
!QTestResult::...pCurrentTest()Description
TRUEevaluated 1244 times by 505 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEevaluated 26 times by 2 tests
Evaluated by:
  • tst_Lancelot
  • tst_selftests - unknown status
!previousFailedDescription
TRUEevaluated 1217 times by 503 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEevaluated 27 times by 3 tests
Evaluated by:
  • tst_QLocale
  • tst_QThreadStorage
  • tst_selftests - unknown status
26-1244
1318 for (int i = 0, count = int(m_methods.size()); i < count; ++i) {
i < countDescription
TRUEevaluated 13256 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
FALSEevaluated 1135 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
1135-13256
1319 const char *data = Q_NULLPTR;-
1320 if (i < QTest::testTags.size() && !QTest::testTags.at(i).isEmpty())
i < QTest::testTags.size()Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 13192 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
!QTest::testTa...t(i).isEmpty()Description
TRUEevaluated 27 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 37 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
27-13192
1321 data = qstrdup(QTest::testTags.at(i).toLatin1().constData());
executed 27 times by 1 test: data = qstrdup(QTest::testTags.at(i).toLatin1().constData());
Executed by:
  • tst_selftests - unknown status
27
1322 const bool ok = invokeTest(i, data, watchDog.data());-
1323 delete [] data;-
1324 if (!ok)
!okDescription
TRUEnever evaluated
FALSEevaluated 13174 times by 502 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
0-13174
1325 break;
never executed: break;
0
1326 }
executed 13174 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
13174
1327 }
executed 1135 times by 502 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
1135
1328-
1329 QTestResult::setSkipCurrentTest(false);-
1330 QTestResult::setBlacklistCurrentTest(false);-
1331 QTestResult::setCurrentTestFunction("cleanupTestCase");-
1332 if (m_cleanupTestCaseMethod.isValid())
m_cleanupTestC...thod.isValid()Description
TRUEevaluated 210 times by 85 tests
Evaluated by:
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QCache
  • tst_QCheckBox
  • tst_QCommandLinkButton
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileInfo
  • tst_QFocusEvent
  • ...
FALSEevaluated 978 times by 421 tests
Evaluated by:
  • tst_Collections
  • tst_Compiler
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAtomicInteger_char
  • tst_QAtomicInteger_char16_t
  • ...
210-978
1333 m_cleanupTestCaseMethod.invoke(testObject, Qt::DirectConnection);
executed 210 times by 85 tests: m_cleanupTestCaseMethod.invoke(testObject, Qt::DirectConnection);
Executed by:
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAction
  • tst_QCache
  • tst_QCheckBox
  • tst_QCommandLinkButton
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QDoubleSpinBox
  • tst_QFile
  • tst_QFileInfo
  • tst_QFocusEvent
  • ...
210
1334 QTestResult::finishedCurrentTestData();-
1335 QTestResult::finishedCurrentTestDataCleanup();-
1336 }
executed 1188 times by 505 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
  • ...
1188
1337 QTestResult::finishedCurrentTestFunction();-
1338 QTestResult::setCurrentTestFunction(0);-
1339 QTestTable::clearGlobalTestTable();-
1340-
1341 QTestLog::stopLogging();-
1342}
executed 1238 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
1238
1343-
1344#if defined(Q_OS_UNIX)-
1345class FatalSignalHandler-
1346{-
1347public:-
1348 FatalSignalHandler();-
1349 ~FatalSignalHandler();-
1350-
1351private:-
1352 static void signal(int);-
1353 sigset_t handledSignals;-
1354};-
1355-
1356void FatalSignalHandler::signal(int signum)-
1357{-
1358 const int msecsFunctionTime = qRound(QTestLog::msecsFunctionTime());-
1359 const int msecsTotalTime = qRound(QTestLog::msecsTotalTime());-
1360 if (signum != SIGINT)
signum != 2Description
TRUEnever evaluated
FALSEnever evaluated
0
1361 stackTrace();
never executed: stackTrace();
0
1362 qFatal("Received signal %d\n"-
1363 " Function time: %dms Total time: %dms",-
1364 signum, msecsFunctionTime, msecsTotalTime);-
1365#if defined(Q_OS_INTEGRITY)-
1366 {-
1367 struct sigaction act;-
1368 memset(&act, 0, sizeof(struct sigaction));-
1369 act.sa_handler = SIG_DFL;-
1370 sigaction(signum, &act, NULL);-
1371 }-
1372#endif-
1373}
never executed: end of block
0
1374-
1375FatalSignalHandler::FatalSignalHandler()-
1376{-
1377 sigemptyset(&handledSignals);-
1378-
1379 const int fatalSignals[] = {-
1380 SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGBUS, SIGFPE, SIGSEGV, SIGPIPE, SIGTERM, 0 };-
1381-
1382 struct sigaction act;-
1383 memset(&act, 0, sizeof(act));-
1384 act.sa_handler = FatalSignalHandler::signal;-
1385-
1386 // Remove the handler after it is invoked.-
1387#if !defined(Q_OS_INTEGRITY)-
1388 act.sa_flags = SA_RESETHAND;-
1389#endif-
1390-
1391#ifdef SA_ONSTACK-
1392 // Let the signal handlers use an alternate stack-
1393 // This is necessary if SIGSEGV is to catch a stack overflow-
1394# if defined(Q_CC_GNU) && defined(Q_OF_ELF)-
1395 // Put the alternate stack in the .lbss (large BSS) section so that it doesn't-
1396 // interfere with normal .bss symbols-
1397 __attribute__((section(".lbss.altstack"), aligned(4096)))-
1398# endif-
1399 static char alternate_stack[16 * 1024];-
1400 stack_t stack;-
1401 stack.ss_flags = 0;-
1402 stack.ss_size = sizeof alternate_stack;-
1403 stack.ss_sp = alternate_stack;-
1404 sigaltstack(&stack, 0);-
1405 act.sa_flags |= SA_ONSTACK;-
1406#endif-
1407-
1408 // Block all fatal signals in our signal handler so we don't try to close-
1409 // the testlog twice.-
1410 sigemptyset(&act.sa_mask);-
1411 for (int i = 0; fatalSignals[i]; ++i)
fatalSignals[i]Description
TRUEevaluated 11880 times by 506 tests
Evaluated 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
  • ...
FALSEevaluated 1320 times by 506 tests
Evaluated 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
  • ...
1320-11880
1412 sigaddset(&act.sa_mask, fatalSignals[i]);
executed 11880 times by 506 tests: sigaddset(&act.sa_mask, fatalSignals[i]);
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
  • ...
11880
1413-
1414 struct sigaction oldact;-
1415-
1416 for (int i = 0; fatalSignals[i]; ++i) {
fatalSignals[i]Description
TRUEevaluated 11880 times by 506 tests
Evaluated 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
  • ...
FALSEevaluated 1320 times by 506 tests
Evaluated 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
  • ...
1320-11880
1417 sigaction(fatalSignals[i], &act, &oldact);-
1418 if (-
1419#ifdef SA_SIGINFO-
1420 oldact.sa_flags & SA_SIGINFO ||
oldact.sa_flags & 4Description
TRUEnever evaluated
FALSEevaluated 11880 times by 506 tests
Evaluated 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-11880
1421#endif-
1422 oldact.sa_handler != SIG_DFL) {
oldact.__sigac...ghandler_t) 0)Description
TRUEevaluated 6600 times by 506 tests
Evaluated 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
  • ...
FALSEevaluated 5280 times by 506 tests
Evaluated 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
  • ...
5280-6600
1423 sigaction(fatalSignals[i], &oldact, 0);-
1424 } else
executed 6600 times by 506 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
  • ...
6600
1425 {-
1426 sigaddset(&handledSignals, fatalSignals[i]);-
1427 }
executed 5280 times by 506 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
  • ...
5280
1428 }-
1429}
executed 1320 times by 506 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
  • ...
1320
1430-
1431-
1432FatalSignalHandler::~FatalSignalHandler()-
1433{-
1434 // Unregister any of our remaining signal handlers-
1435 struct sigaction act;-
1436 memset(&act, 0, sizeof(act));-
1437 act.sa_handler = SIG_DFL;-
1438-
1439 struct sigaction oldact;-
1440-
1441 for (int i = 1; i < 32; ++i) {
i < 32Description
TRUEevaluated 39153 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
FALSEevaluated 1263 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
1263-39153
1442 if (!sigismember(&handledSignals, i))
!sigismember(&...ledSignals, i)Description
TRUEevaluated 34101 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
FALSEevaluated 5052 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
5052-34101
1443 continue;
executed 34101 times by 508 tests: continue;
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
34101
1444 sigaction(i, &act, &oldact);-
1445-
1446 // If someone overwrote it in the mean time, put it back-
1447 if (oldact.sa_handler != FatalSignalHandler::signal)
oldact.__sigac...andler::signalDescription
TRUEevaluated 66 times by 66 tests
Evaluated by:
  • tst_lancelot - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qapplication - unknown status
  • tst_qcommandlineparser - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qdir - unknown status
  • tst_qeventloop - unknown status
  • tst_qfile - unknown status
  • tst_qfont - unknown status
  • tst_qftp - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qicon - unknown status
  • tst_qimagereader - unknown status
  • ...
FALSEevaluated 4986 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
66-4986
1448 sigaction(i, &oldact, 0);
executed 66 times by 66 tests: sigaction(i, &oldact, 0);
Executed by:
  • tst_lancelot - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qapplication - unknown status
  • tst_qcommandlineparser - unknown status
  • tst_qdbusabstractadaptor - unknown status
  • tst_qdbusabstractinterface - unknown status
  • tst_qdbusconnection - unknown status
  • tst_qdbusconnection_spyhook - unknown status
  • tst_qdbuscpp2xml - unknown status
  • tst_qdbusinterface - unknown status
  • tst_qdbusmarshall - unknown status
  • tst_qdbusxml2cpp - unknown status
  • tst_qdir - unknown status
  • tst_qeventloop - unknown status
  • tst_qfile - unknown status
  • tst_qfont - unknown status
  • tst_qftp - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qicon - unknown status
  • tst_qimagereader - unknown status
  • ...
66
1449 }
executed 5052 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
5052
1450}
executed 1263 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
1263
1451-
1452#endif-
1453-
1454-
1455} // namespace-
1456-
1457#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)-
1458-
1459// Helper class for resolving symbol names by dynamically loading "dbghelp.dll".-
1460class DebugSymbolResolver-
1461{-
1462 Q_DISABLE_COPY(DebugSymbolResolver)-
1463public:-
1464 struct Symbol {-
1465 Symbol() : name(Q_NULLPTR), address(0) {}-
1466-
1467 const char *name; // Must be freed by caller.-
1468 DWORD64 address;-
1469 };-
1470-
1471 explicit DebugSymbolResolver(HANDLE process);-
1472 ~DebugSymbolResolver() { cleanup(); }-
1473-
1474 bool isValid() const { return m_symFromAddr; }-
1475-
1476 Symbol resolveSymbol(DWORD64 address) const;-
1477-
1478private:-
1479 // typedefs from DbgHelp.h/.dll-
1480 struct DBGHELP_SYMBOL_INFO { // SYMBOL_INFO-
1481 ULONG SizeOfStruct;-
1482 ULONG TypeIndex; // Type Index of symbol-
1483 ULONG64 Reserved[2];-
1484 ULONG Index;-
1485 ULONG Size;-
1486 ULONG64 ModBase; // Base Address of module comtaining this symbol-
1487 ULONG Flags;-
1488 ULONG64 Value; // Value of symbol, ValuePresent should be 1-
1489 ULONG64 Address; // Address of symbol including base address of module-
1490 ULONG Register; // register holding value or pointer to value-
1491 ULONG Scope; // scope of the symbol-
1492 ULONG Tag; // pdb classification-
1493 ULONG NameLen; // Actual length of name-
1494 ULONG MaxNameLen;-
1495 CHAR Name[1]; // Name of symbol-
1496 };-
1497-
1498 typedef BOOL (__stdcall *SymInitializeType)(HANDLE, PCSTR, BOOL);-
1499 typedef BOOL (__stdcall *SymFromAddrType)(HANDLE, DWORD64, PDWORD64, DBGHELP_SYMBOL_INFO *);-
1500-
1501 void cleanup();-
1502-
1503 const HANDLE m_process;-
1504 HMODULE m_dbgHelpLib;-
1505 SymFromAddrType m_symFromAddr;-
1506};-
1507-
1508void DebugSymbolResolver::cleanup()-
1509{-
1510 if (m_dbgHelpLib)-
1511 FreeLibrary(m_dbgHelpLib);-
1512 m_dbgHelpLib = 0;-
1513 m_symFromAddr = Q_NULLPTR;-
1514}-
1515-
1516DebugSymbolResolver::DebugSymbolResolver(HANDLE process)-
1517 : m_process(process), m_dbgHelpLib(0), m_symFromAddr(Q_NULLPTR)-
1518{-
1519 bool success = false;-
1520 m_dbgHelpLib = LoadLibraryW(L"dbghelp.dll");-
1521 if (m_dbgHelpLib) {-
1522 SymInitializeType symInitialize = (SymInitializeType)(GetProcAddress(m_dbgHelpLib, "SymInitialize"));-
1523 m_symFromAddr = (SymFromAddrType)(GetProcAddress(m_dbgHelpLib, "SymFromAddr"));-
1524 success = symInitialize && m_symFromAddr && symInitialize(process, NULL, TRUE);-
1525 }-
1526 if (!success)-
1527 cleanup();-
1528}-
1529-
1530DebugSymbolResolver::Symbol DebugSymbolResolver::resolveSymbol(DWORD64 address) const-
1531{-
1532 // reserve additional buffer where SymFromAddr() will store the name-
1533 struct NamedSymbolInfo : public DBGHELP_SYMBOL_INFO {-
1534 enum { symbolNameLength = 255 };-
1535-
1536 char name[symbolNameLength + 1];-
1537 };-
1538-
1539 Symbol result;-
1540 if (!isValid())-
1541 return result;-
1542 NamedSymbolInfo symbolBuffer;-
1543 memset(&symbolBuffer, 0, sizeof(NamedSymbolInfo));-
1544 symbolBuffer.MaxNameLen = NamedSymbolInfo::symbolNameLength;-
1545 symbolBuffer.SizeOfStruct = sizeof(DBGHELP_SYMBOL_INFO);-
1546 if (!m_symFromAddr(m_process, address, 0, &symbolBuffer))-
1547 return result;-
1548 result.name = qstrdup(symbolBuffer.Name);-
1549 result.address = symbolBuffer.Address;-
1550 return result;-
1551}-
1552-
1553static LONG WINAPI windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo)-
1554{-
1555 enum { maxStackFrames = 100 };-
1556 char appName[MAX_PATH];-
1557 if (!GetModuleFileNameA(NULL, appName, MAX_PATH))-
1558 appName[0] = 0;-
1559 const int msecsFunctionTime = qRound(QTestLog::msecsFunctionTime());-
1560 const int msecsTotalTime = qRound(QTestLog::msecsTotalTime());-
1561 const void *exceptionAddress = exInfo->ExceptionRecord->ExceptionAddress;-
1562 printf("A crash occurred in %s.\n"-
1563 "Function time: %dms Total time: %dms\n\n"-
1564 "Exception address: 0x%p\n"-
1565 "Exception code : 0x%lx\n",-
1566 appName, msecsFunctionTime, msecsTotalTime,-
1567 exceptionAddress, exInfo->ExceptionRecord->ExceptionCode);-
1568-
1569 DebugSymbolResolver resolver(GetCurrentProcess());-
1570 if (resolver.isValid()) {-
1571 DebugSymbolResolver::Symbol exceptionSymbol = resolver.resolveSymbol(DWORD64(exceptionAddress));-
1572 if (exceptionSymbol.name) {-
1573 printf("Nearby symbol : %s\n", exceptionSymbol.name);-
1574 delete [] exceptionSymbol.name;-
1575 }-
1576 void *stack[maxStackFrames];-
1577 fputs("\nStack:\n", stdout);-
1578 const unsigned frameCount = CaptureStackBackTrace(0, DWORD(maxStackFrames), stack, NULL);-
1579 for (unsigned f = 0; f < frameCount; ++f) {-
1580 DebugSymbolResolver::Symbol symbol = resolver.resolveSymbol(DWORD64(stack[f]));-
1581 if (symbol.name) {-
1582 printf("#%3u: %s() - 0x%p\n", f + 1, symbol.name, (const void *)symbol.address);-
1583 delete [] symbol.name;-
1584 } else {-
1585 printf("#%3u: Unable to obtain symbol\n", f + 1);-
1586 }-
1587 }-
1588 }-
1589-
1590 fputc('\n', stdout);-
1591 fflush(stdout);-
1592-
1593 return EXCEPTION_EXECUTE_HANDLER;-
1594}-
1595#endif // Q_OS_WIN) && !Q_OS_WINCE && !Q_OS_WINRT-
1596-
1597static void initEnvironment()-
1598{-
1599 qputenv("QT_LOGGING_TO_CONSOLE", "1");-
1600 qputenv("QT_QTESTLIB_RUNNING", "1");-
1601}
executed 815 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
815
1602-
1603/*!-
1604 Executes tests declared in \a testObject. In addition, the private slots-
1605 \c{initTestCase()}, \c{cleanupTestCase()}, \c{init()} and \c{cleanup()}-
1606 are executed if they exist. See \l{Creating a Test} for more details.-
1607-
1608 Optionally, the command line arguments \a argc and \a argv can be provided.-
1609 For a list of recognized arguments, read \l {Qt Test Command Line Arguments}.-
1610-
1611 The following example will run all tests in \c MyTestObject:-
1612-
1613 \snippet code/src_qtestlib_qtestcase.cpp 18-
1614-
1615 This function returns 0 if no tests failed, or a value other than 0 if one-
1616 or more tests failed or in case of unhandled exceptions. (Skipped tests do-
1617 not influence the return value.)-
1618-
1619 For stand-alone test applications, the convenience macro \l QTEST_MAIN() can-
1620 be used to declare a main() function that parses the command line arguments-
1621 and executes the tests, avoiding the need to call this function explicitly.-
1622-
1623 The return value from this function is also the exit code of the test-
1624 application when the \l QTEST_MAIN() macro is used.-
1625-
1626 For stand-alone test applications, this function should not be called more-
1627 than once, as command-line options for logging test output to files and-
1628 executing individual test functions will not behave correctly.-
1629-
1630 Note: This function is not reentrant, only one test can run at a time. A-
1631 test that was executed with qExec() can't run another test via qExec() and-
1632 threads are not allowed to call qExec() simultaneously.-
1633-
1634 If you have programatically created the arguments, as opposed to getting them-
1635 from the arguments in \c main(), it is likely of interest to use-
1636 QTest::qExec(QObject *, const QStringList &) since it is Unicode safe.-
1637-
1638 \sa QTEST_MAIN()-
1639*/-
1640-
1641int QTest::qExec(QObject *testObject, int argc, char **argv)-
1642{-
1643 initEnvironment();-
1644 QBenchmarkGlobalData benchmarkData;-
1645 QBenchmarkGlobalData::current = &benchmarkData;-
1646-
1647#ifdef QTESTLIB_USE_VALGRIND-
1648 int callgrindChildExitCode = 0;-
1649#endif-
1650-
1651#if defined(Q_OS_MACX)-
1652 bool macNeedsActivate = qApp && (qstrcmp(qApp->metaObject()->className(), "QApplication") == 0);-
1653 IOPMAssertionID powerID;-
1654-
1655 // Don't restore saved window state for auto tests.-
1656 QTestPrivate::disableWindowRestore();-
1657#endif-
1658#ifndef QT_NO_EXCEPTIONS-
1659 try {-
1660#endif-
1661-
1662#if defined(Q_OS_MACX)-
1663 if (macNeedsActivate) {-
1664 CFStringRef reasonForActivity= CFSTR("No Display Sleep");-
1665 IOReturn ok = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &powerID);-
1666-
1667 if (ok != kIOReturnSuccess)-
1668 macNeedsActivate = false; // no need to release the assertion on exit.-
1669 }-
1670#endif-
1671-
1672 QTestPrivate::parseBlackList();-
1673 QTestPrivate::parseGpuBlackList();-
1674-
1675 QTestResult::reset();-
1676-
1677 QTEST_ASSERT(testObject);
never executed: qt_assert("testObject",__FILE__,1677);
!(testObject)Description
TRUEnever evaluated
FALSEevaluated 815 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-815
1678 QTEST_ASSERT(!currentTestObject);
never executed: qt_assert("!currentTestObject",__FILE__,1678);
!(!currentTestObject)Description
TRUEnever evaluated
FALSEevaluated 815 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-815
1679 currentTestObject = testObject;-
1680-
1681 const QMetaObject *metaObject = testObject->metaObject();-
1682 QTEST_ASSERT(metaObject);
never executed: qt_assert("metaObject",__FILE__,1682);
!(metaObject)Description
TRUEnever evaluated
FALSEevaluated 815 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-815
1683-
1684 QTestResult::setCurrentTestObject(metaObject->className());-
1685 if (argc > 0)
argc > 0Description
TRUEevaluated 815 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
0-815
1686 QTestResult::setCurrentAppName(argv[0]);
executed 815 times by 1 test: QTestResult::setCurrentAppName(argv[0]);
Executed by:
  • tst_selftests - unknown status
815
1687-
1688 qtest_qParseArgs(argc, argv, false);-
1689-
1690#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)-
1691 if (!noCrashHandler) {-
1692# ifndef Q_CC_MINGW-
1693 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);-
1694# endif-
1695# ifndef Q_OS_WINRT-
1696 SetErrorMode(SetErrorMode(0) | SEM_NOGPFAULTERRORBOX);-
1697 SetUnhandledExceptionFilter(windowsFaultHandler);-
1698# endif-
1699 } // !noCrashHandler-
1700#endif // Q_OS_WIN) && !Q_OS_WINCE && !Q_OS_WINRT-
1701-
1702#ifdef QTESTLIB_USE_VALGRIND-
1703 if (QBenchmarkGlobalData::current->mode() == QBenchmarkGlobalData::CallgrindParentProcess) {
QBenchmarkGlob...dParentProcessDescription
TRUEnever evaluated
FALSEevaluated 1320 times by 506 tests
Evaluated 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-1320
1704 if (Q_UNLIKELY(!qApp))
__builtin_expe...nce()), false)Description
TRUEnever evaluated
FALSEnever evaluated
0
1705 qFatal("QtTest: -callgrind option is not available with QTEST_APPLESS_MAIN");
never executed: QMessageLogger(__FILE__, 1705, __PRETTY_FUNCTION__).fatal("QtTest: -callgrind option is not available with QTEST_APPLESS_MAIN");
0
1706-
1707 const QStringList origAppArgs(QCoreApplication::arguments());-
1708 if (!QBenchmarkValgrindUtils::rerunThroughCallgrind(origAppArgs, callgrindChildExitCode))
!QBenchmarkVal...ChildExitCode)Description
TRUEnever evaluated
FALSEnever evaluated
0
1709 return -1;
never executed: return -1;
0
1710-
1711 QBenchmarkValgrindUtils::cleanup();-
1712-
1713 } else
never executed: end of block
0
1714#endif-
1715 {-
1716#if defined(Q_OS_UNIX)-
1717 QScopedPointer<FatalSignalHandler> handler;-
1718 if (!noCrashHandler)
!noCrashHandlerDescription
TRUEevaluated 1320 times by 506 tests
Evaluated 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
  • ...
FALSEnever evaluated
0-1320
1719 handler.reset(new FatalSignalHandler);
executed 1320 times by 506 tests: handler.reset(new FatalSignalHandler);
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
  • ...
1320
1720#endif-
1721 TestMethods::MetaMethods commandLineMethods;-
1722 for (const QString &tf : qAsConst(QTest::testFunctions)) {-
1723 const QByteArray tfB = tf.toLatin1();-
1724 const QByteArray signature = tfB + QByteArrayLiteral("()");
executed 64 times by 1 test: return ba;
Executed by:
  • tst_selftests - unknown status
64
1725 QMetaMethod m = TestMethods::findMethod(testObject, signature.constData());-
1726 if (!m.isValid() || !isValidSlot(m)) {
!m.isValid()Description
TRUEnever evaluated
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
!isValidSlot(m)Description
TRUEnever evaluated
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
0-64
1727 fprintf(stderr, "Unknown test function: '%s'. Possible matches:\n", tfB.constData());-
1728 qPrintTestSlots(stderr, tfB.constData());-
1729 fprintf(stderr, "\n%s -functions\nlists all available test functions.\n", argv[0]);-
1730 exit(1);
never executed: exit(1);
0
1731 }-
1732 commandLineMethods.push_back(m);-
1733 }
executed 64 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
64
1734 TestMethods test(testObject, commandLineMethods);-
1735 test.invokeTests(testObject);-
1736 }
executed 1238 times by 508 tests: end of block
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
1238
1737-
1738#ifndef QT_NO_EXCEPTIONS-
1739 } catch (...) {-
1740 QTestResult::addFailure("Caught unhandled exception", __FILE__, __LINE__);-
1741 if (QTestResult::currentTestFunction()) {
QTestResult::c...TestFunction()Description
TRUEevaluated 25 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
0-25
1742 QTestResult::finishedCurrentTestFunction();-
1743 QTestResult::setCurrentTestFunction(0);-
1744 }
executed 25 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
25
1745-
1746 QTestLog::stopLogging();-
1747#if defined(Q_OS_MACX)-
1748 if (macNeedsActivate) {-
1749 IOPMAssertionRelease(powerID);-
1750 }-
1751#endif-
1752 currentTestObject = 0;-
1753-
1754 // Rethrow exception to make debugging easier.-
1755 throw;
executed 25 times by 1 test: throw;
Executed by:
  • tst_selftests - unknown status
25
1756 return 1;
dead code: return 1;
-
1757 }-
1758#endif-
1759-
1760 currentTestObject = 0;-
1761-
1762 QSignalDumper::endDump();-
1763-
1764#if defined(Q_OS_MACX)-
1765 if (macNeedsActivate) {-
1766 IOPMAssertionRelease(powerID);-
1767 }-
1768#endif-
1769-
1770#ifdef QTESTLIB_USE_VALGRIND-
1771 if (QBenchmarkGlobalData::current->mode() == QBenchmarkGlobalData::CallgrindParentProcess)
QBenchmarkGlob...dParentProcessDescription
TRUEnever evaluated
FALSEevaluated 1238 times by 508 tests
Evaluated by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
0-1238
1772 return callgrindChildExitCode;
never executed: return callgrindChildExitCode;
0
1773#endif-
1774 // make sure our exit code is never going above 127-
1775 // since that could wrap and indicate 0 test fails-
1776 return qMin(QTestLog::failCount(), 127);
executed 1238 times by 508 tests: return qMin(QTestLog::failCount(), 127);
Executed by:
  • tst_collections - unknown status
  • tst_compiler - unknown status
  • tst_gestures - unknown status
  • tst_lancelot - unknown status
  • tst_languagechange - unknown status
  • tst_largefile - unknown status
  • tst_modeltest - unknown status
  • tst_networkselftest - unknown status
  • tst_platformsocketengine - unknown status
  • tst_q_func_info - unknown status
  • tst_qabstractanimation - unknown status
  • tst_qabstractbutton - unknown status
  • tst_qabstractfileengine - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qabstractprintdialog - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qabstractscrollarea - unknown status
  • tst_qabstractslider - unknown status
  • tst_qabstractsocket - unknown status
  • tst_qabstractspinbox - unknown status
  • tst_qabstracttextdocumentlayout - unknown status
  • tst_qaccessibility - unknown status
  • tst_qaction - unknown status
  • ...
1238
1777}-
1778-
1779/*!-
1780 \overload-
1781 \since 4.4-
1782-
1783 Behaves identically to qExec(QObject *, int, char**) but takes a-
1784 QStringList of \a arguments instead of a \c char** list.-
1785 */-
1786int QTest::qExec(QObject *testObject, const QStringList &arguments)-
1787{-
1788 const int argc = arguments.count();-
1789 QVarLengthArray<char *> argv(argc);-
1790-
1791 QVector<QByteArray> args;-
1792 args.reserve(argc);-
1793-
1794 for (int i = 0; i < argc; ++i)
i < argcDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
12-22
1795 {-
1796 args.append(arguments.at(i).toLocal8Bit().constData());-
1797 argv[i] = args.last().data();-
1798 }
executed 22 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
22
1799-
1800 return qExec(testObject, argc, argv.data());
executed 12 times by 1 test: return qExec(testObject, argc, argv.data());
Executed by:
  • tst_selftests - unknown status
12
1801}-
1802-
1803/*! \internal-
1804 */-
1805void QTest::qFail(const char *statementStr, const char *file, int line)-
1806{-
1807 QTestResult::addFailure(statementStr, file, line);-
1808}
executed 462 times by 2 tests: end of block
Executed by:
  • tst_QFtp
  • tst_selftests - unknown status
462
1809-
1810/*! \internal-
1811 */-
1812bool QTest::qVerify(bool statement, const char *statementStr, const char *description,-
1813 const char *file, int line)-
1814{-
1815 return QTestResult::verify(statement, statementStr, description, file, line);
executed 13110397 times by 453 tests: return QTestResult::verify(statement, statementStr, description, file, line);
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • ...
13110397
1816}-
1817-
1818/*! \fn void QTest::qSkip(const char *message, const char *file, int line)-
1819\internal-
1820 */-
1821void QTest::qSkip(const char *message, const char *file, int line)-
1822{-
1823 QTestResult::addSkip(message, file, line);-
1824 QTestResult::setSkipCurrentTest(true);-
1825}
executed 1403 times by 56 tests: end of block
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_QIODevice
  • tst_QImageReader
  • tst_QItemView
  • tst_QLockFile
  • tst_QMainWindow
  • ...
1403
1826-
1827/*! \fn bool QTest::qExpectFail(const char *dataIndex, const char *comment, TestFailMode mode, const char *file, int line)-
1828\internal-
1829 */-
1830bool QTest::qExpectFail(const char *dataIndex, const char *comment,-
1831 QTest::TestFailMode mode, const char *file, int line)-
1832{-
1833 return QTestResult::expectFail(dataIndex, qstrdup(comment), mode, file, line);
executed 8466 times by 39 tests: return QTestResult::expectFail(dataIndex, qstrdup(comment), mode, file, line);
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_QMenu
  • tst_QNetworkCookie
  • tst_QNetworkReply
  • tst_QPlainTextEdit
  • tst_QRect
  • tst_QSequentialAnimationGroup
  • tst_QShortcut
  • tst_QSqlDatabase
  • ...
8466
1834}-
1835-
1836/*! \internal-
1837 */-
1838void QTest::qWarn(const char *message, const char *file, int line)-
1839{-
1840 QTestLog::warn(message, file, line);-
1841}
executed 949 times by 13 tests: end of block
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
949
1842-
1843/*!-
1844 Ignores messages created by qDebug(), qInfo() or qWarning(). If the \a message-
1845 with the corresponding \a type is outputted, it will be removed from the-
1846 test log. If the test finished and the \a message was not outputted,-
1847 a test failure is appended to the test log.-
1848-
1849 \b {Note:} Invoking this function will only ignore one message.-
1850 If the message you want to ignore is outputted twice, you have to-
1851 call ignoreMessage() twice, too.-
1852-
1853 Example:-
1854 \snippet code/src_qtestlib_qtestcase.cpp 19-
1855-
1856 The example above tests that QDir::mkdir() outputs the right warning when invoked-
1857 with an invalid file name.-
1858*/-
1859void QTest::ignoreMessage(QtMsgType type, const char *message)-
1860{-
1861 QTestLog::ignoreMessage(type, message);-
1862}
executed 1073 times by 82 tests: end of block
Executed by:
  • tst_Compiler
  • tst_Gestures
  • tst_PlatformSocketEngine
  • tst_QAccessibility
  • tst_QAnimationGroup
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QBoxLayout
  • tst_QBuffer
  • tst_QComboBox
  • tst_QCommandLineParser
  • tst_QCompleter
  • tst_QDBusLocalCalls
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDate
  • tst_QDebug
  • tst_QDesktopWidget
  • tst_QDir
  • tst_QDnsLookup_Appless
  • tst_QEasingCurve
  • tst_QFile
  • tst_QFileSystemWatcher
  • tst_QFormLayout
  • tst_QFutureWatcher
  • ...
1073
1863-
1864#ifndef QT_NO_REGULAREXPRESSION-
1865/*!-
1866 \overload-
1867-
1868 Ignores messages created by qDebug(), qInfo() or qWarning(). If the message-
1869 matching \a messagePattern-
1870 with the corresponding \a type is outputted, it will be removed from the-
1871 test log. If the test finished and the message was not outputted,-
1872 a test failure is appended to the test log.-
1873-
1874 \b {Note:} Invoking this function will only ignore one message.-
1875 If the message you want to ignore is outputted twice, you have to-
1876 call ignoreMessage() twice, too.-
1877-
1878 \since 5.3-
1879*/-
1880void QTest::ignoreMessage(QtMsgType type, const QRegularExpression &messagePattern)-
1881{-
1882 QTestLog::ignoreMessage(type, messagePattern);-
1883}
executed 116 times by 4 tests: end of block
Executed by:
  • tst_QGuiVariant
  • tst_QVariant
  • tst_QWidgetsVariant
  • tst_selftests - unknown status
116
1884#endif // QT_NO_REGULAREXPRESSION-
1885-
1886/*! \internal-
1887 */-
1888-
1889#ifdef Q_OS_WIN-
1890static inline bool isWindowsBuildDirectory(const QString &dirName)-
1891{-
1892 return dirName.compare(QLatin1String("Debug"), Qt::CaseInsensitive) == 0-
1893 || dirName.compare(QLatin1String("Release"), Qt::CaseInsensitive) == 0;-
1894}-
1895#endif-
1896-
1897/*!-
1898 Extracts a directory from resources to disk. The content is extracted-
1899 recursively to a temporary folder. The extracted content is removed-
1900 automatically once the last reference to the return value goes out of scope.-
1901-
1902 \a dirName is the name of the directory to extract from resources.-
1903-
1904 Returns the temporary directory where the data was extracted or null in case of-
1905 errors.-
1906 */-
1907QSharedPointer<QTemporaryDir> QTest::qExtractTestData(const QString &dirName)-
1908{-
1909 QSharedPointer<QTemporaryDir> result; // null until success, then == tempDir-
1910-
1911 QSharedPointer<QTemporaryDir> tempDir = QSharedPointer<QTemporaryDir>::create();-
1912-
1913 tempDir->setAutoRemove(true);-
1914-
1915 if (!tempDir->isValid())
!tempDir->isValid()Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
0-1
1916 return result;
never executed: return result;
0
1917-
1918 const QString dataPath = tempDir->path();-
1919 const QString resourcePath = QLatin1Char(':') + dirName;-
1920 const QFileInfo fileInfo(resourcePath);-
1921-
1922 if (!fileInfo.isDir()) {
!fileInfo.isDir()Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
0-1
1923 qWarning("Resource path '%s' is not a directory.", qPrintable(resourcePath));-
1924 return result;
never executed: return result;
0
1925 }-
1926-
1927 QDirIterator it(resourcePath, QDirIterator::Subdirectories);-
1928 if (!it.hasNext()) {
!it.hasNext()Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
0-1
1929 qWarning("Resource directory '%s' is empty.", qPrintable(resourcePath));-
1930 return result;
never executed: return result;
0
1931 }-
1932-
1933 while (it.hasNext()) {
it.hasNext()Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tst_QFileInfo
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
1-5
1934 it.next();-
1935-
1936 QFileInfo fileInfo = it.fileInfo();-
1937-
1938 if (!fileInfo.isDir()) {
!fileInfo.isDir()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFileInfo
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QFileInfo
1-4
1939 const QString destination = dataPath + QLatin1Char('/') + fileInfo.filePath().midRef(resourcePath.length());-
1940 QFileInfo destinationFileInfo(destination);-
1941 QDir().mkpath(destinationFileInfo.path());-
1942 if (!QFile::copy(fileInfo.filePath(), destination)) {
!QFile::copy(f..., destination)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFileInfo
0-4
1943 qWarning("Failed to copy '%s'.", qPrintable(fileInfo.filePath()));-
1944 return result;
never executed: return result;
0
1945 }-
1946 if (!QFile::setPermissions(destination, QFile::ReadUser | QFile::WriteUser | QFile::ReadGroup)) {
!QFile::setPer...le::ReadGroup)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFileInfo
0-4
1947 qWarning("Failed to set permissions on '%s'.", qPrintable(destination));-
1948 return result;
never executed: return result;
0
1949 }-
1950 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QFileInfo
4
1951 }
executed 5 times by 1 test: end of block
Executed by:
  • tst_QFileInfo
5
1952-
1953 result = qMove(tempDir);-
1954-
1955 return result;
executed 1 time by 1 test: return result;
Executed by:
  • tst_QFileInfo
1
1956}-
1957-
1958/*! \internal-
1959 */-
1960-
1961QString QTest::qFindTestData(const QString& base, const char *file, int line, const char *builddir)-
1962{-
1963 QString found;-
1964-
1965 // Testdata priorities:-
1966-
1967 // 1. relative to test binary.-
1968 if (qApp) {
QCoreApplication::instance()Description
TRUEevaluated 1115 times by 69 tests
Evaluated by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFontDialog
  • tst_QFrame
  • tst_QFtp
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLayout
  • ...
FALSEevaluated 273 times by 4 tests
Evaluated by:
  • tst_QApplication
  • tst_QChar
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
273-1115
1969 QDir binDirectory(QCoreApplication::applicationDirPath());-
1970 if (binDirectory.exists(base)) {
binDirectory.exists(base)Description
TRUEevaluated 324 times by 64 tests
Evaluated by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFrame
  • tst_QFtp
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLayout
  • tst_QLibrary
  • tst_QLocale
  • tst_QLockFile
  • ...
FALSEevaluated 791 times by 8 tests
Evaluated by:
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_selftests - unknown status
324-791
1971 found = binDirectory.absoluteFilePath(base);-
1972 }
executed 324 times by 64 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFrame
  • tst_QFtp
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLayout
  • tst_QLibrary
  • tst_QLocale
  • tst_QLockFile
  • ...
324
1973#ifdef Q_OS_WIN-
1974 // Windows: The executable is typically located in one of the-
1975 // 'Release' or 'Debug' directories.-
1976 else if (isWindowsBuildDirectory(binDirectory.dirName())-
1977 && binDirectory.cdUp() && binDirectory.exists(base)) {-
1978 found = binDirectory.absoluteFilePath(base);-
1979 }-
1980#endif // Q_OS_WIN-
1981 else if (QTestLog::verboseLevel() >= 2) {
QTestLog::verboseLevel() >= 2Description
TRUEnever evaluated
FALSEevaluated 791 times by 8 tests
Evaluated by:
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_selftests - unknown status
0-791
1982 const QString candidate = QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + QLatin1Char('/') + base);-
1983 QTestLog::info(qPrintable(-
1984 QString::fromLatin1("testdata %1 not found relative to test binary [%2]; "-
1985 "checking next location").arg(base, candidate)),-
1986 file, line);-
1987 }
never executed: end of block
0
1988 }
executed 1115 times by 69 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFontDialog
  • tst_QFrame
  • tst_QFtp
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLayout
  • ...
1115
1989-
1990 // 2. installed path.-
1991 if (found.isEmpty()) {
found.isEmpty()Description
TRUEevaluated 1064 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QChar
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
FALSEevaluated 324 times by 64 tests
Evaluated by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFrame
  • tst_QFtp
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLayout
  • tst_QLibrary
  • tst_QLocale
  • tst_QLockFile
  • ...
324-1064
1992 const char *testObjectName = QTestResult::currentTestObjectName();-
1993 if (testObjectName) {
testObjectNameDescription
TRUEevaluated 1064 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QChar
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
FALSEnever evaluated
0-1064
1994 QString testsPath = QLibraryInfo::location(QLibraryInfo::TestsPath);-
1995 QString candidate = QString::fromLatin1("%1/%2/%3")-
1996 .arg(testsPath, QFile::decodeName(testObjectName).toLower(), base);-
1997 if (QFileInfo::exists(candidate)) {
QFileInfo::exists(candidate)Description
TRUEevaluated 25 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEevaluated 1039 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QChar
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
25-1039
1998 found = candidate;-
1999 }
executed 25 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
25
2000 else if (QTestLog::verboseLevel() >= 2) {
QTestLog::verboseLevel() >= 2Description
TRUEnever evaluated
FALSEevaluated 1039 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QChar
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
0-1039
2001 QTestLog::info(qPrintable(-
2002 QString::fromLatin1("testdata %1 not found in tests install path [%2]; "-
2003 "checking next location")-
2004 .arg(base, QDir::toNativeSeparators(candidate))),-
2005 file, line);-
2006 }
never executed: end of block
0
2007 }
executed 1064 times by 11 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QChar
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
1064
2008 }
executed 1064 times by 11 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QChar
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
1064
2009-
2010 // 3. relative to test source.-
2011 if (found.isEmpty()) {
found.isEmpty()Description
TRUEevaluated 1039 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QChar
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
FALSEevaluated 349 times by 64 tests
Evaluated by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFrame
  • tst_QFtp
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLayout
  • tst_QLibrary
  • tst_QLocale
  • tst_QLockFile
  • ...
349-1039
2012 // srcdir is the directory containing the calling source file.-
2013 QFileInfo srcdir = QFileInfo(QFile::decodeName(file)).path();-
2014-
2015 // If the srcdir is relative, that means it is relative to the current working-
2016 // directory of the compiler at compile time, which should be passed in as `builddir'.-
2017 if (!srcdir.isAbsolute() && builddir) {
!srcdir.isAbsolute()Description
TRUEevaluated 1014 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QChar
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
FALSEevaluated 25 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
builddirDescription
TRUEevaluated 176 times by 11 tests
Evaluated by:
  • tst_QApplication
  • tst_QChar
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
FALSEevaluated 838 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
25-1014
2018 srcdir.setFile(QFile::decodeName(builddir) + QLatin1String("/") + srcdir.filePath());-
2019 }
executed 176 times by 11 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QChar
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
176
2020-
2021 QString candidate = QString::fromLatin1("%1/%2").arg(srcdir.canonicalFilePath(), base);-
2022 if (QFileInfo::exists(candidate)) {
QFileInfo::exists(candidate)Description
TRUEevaluated 160 times by 5 tests
Evaluated by:
  • tst_QApplication
  • tst_QChar
  • tst_QGraphicsScene
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
FALSEevaluated 879 times by 7 tests
Evaluated by:
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_selftests - unknown status
160-879
2023 found = candidate;-
2024 }
executed 160 times by 5 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QChar
  • tst_QGraphicsScene
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
160
2025 else if (QTestLog::verboseLevel() >= 2) {
QTestLog::verboseLevel() >= 2Description
TRUEnever evaluated
FALSEevaluated 879 times by 7 tests
Evaluated by:
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_selftests - unknown status
0-879
2026 QTestLog::info(qPrintable(-
2027 QString::fromLatin1("testdata %1 not found relative to source path [%2]")-
2028 .arg(base, QDir::toNativeSeparators(candidate))),-
2029 file, line);-
2030 }
never executed: end of block
0
2031 }
executed 1039 times by 11 tests: end of block
Executed by:
  • tst_QApplication
  • tst_QChar
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_qdbuscpp2xml
  • tst_selftests - unknown status
1039
2032-
2033 // 4. Try resources-
2034 if (found.isEmpty()) {
found.isEmpty()Description
TRUEevaluated 879 times by 7 tests
Evaluated by:
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_selftests - unknown status
FALSEevaluated 509 times by 67 tests
Evaluated by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QChar
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFrame
  • tst_QFtp
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLayout
  • tst_QLibrary
  • ...
509-879
2035 QString candidate = QString::fromLatin1(":/%1").arg(base);-
2036 if (QFileInfo::exists(candidate))
QFileInfo::exists(candidate)Description
TRUEevaluated 8 times by 3 tests
Evaluated by:
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QRawFont
FALSEevaluated 871 times by 4 tests
Evaluated by:
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_selftests - unknown status
8-871
2037 found = candidate;
executed 8 times by 3 tests: found = candidate;
Executed by:
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QRawFont
8
2038 }
executed 879 times by 7 tests: end of block
Executed by:
  • tst_QFontDialog
  • tst_QGlyphRun
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_QRawFont
  • tst_selftests - unknown status
879
2039-
2040 // 5. Try current directory-
2041 if (found.isEmpty()) {
found.isEmpty()Description
TRUEevaluated 871 times by 4 tests
Evaluated by:
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_selftests - unknown status
FALSEevaluated 517 times by 69 tests
Evaluated by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QChar
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFontDialog
  • tst_QFrame
  • tst_QFtp
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • ...
517-871
2042 QString candidate = QString::fromLatin1("%1/%2").arg(QDir::currentPath()).arg(base);-
2043 if (QFileInfo::exists(candidate))
QFileInfo::exists(candidate)Description
TRUEnever evaluated
FALSEevaluated 871 times by 4 tests
Evaluated by:
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_selftests - unknown status
0-871
2044 found = candidate;
never executed: found = candidate;
0
2045 }
executed 871 times by 4 tests: end of block
Executed by:
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_selftests - unknown status
871
2046-
2047 // 6. Try main source directory-
2048 if (found.isEmpty()) {
found.isEmpty()Description
TRUEevaluated 871 times by 4 tests
Evaluated by:
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_selftests - unknown status
FALSEevaluated 517 times by 69 tests
Evaluated by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QChar
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFontDialog
  • tst_QFrame
  • tst_QFtp
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • ...
517-871
2049 QString candidate = QTest::mainSourcePath % QLatin1Char('/') % base;-
2050 if (QFileInfo::exists(candidate))
QFileInfo::exists(candidate)Description
TRUEnever evaluated
FALSEevaluated 871 times by 4 tests
Evaluated by:
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_selftests - unknown status
0-871
2051 found = candidate;
never executed: found = candidate;
0
2052 }
executed 871 times by 4 tests: end of block
Executed by:
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_selftests - unknown status
871
2053-
2054 if (found.isEmpty()) {
found.isEmpty()Description
TRUEevaluated 871 times by 4 tests
Evaluated by:
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_selftests - unknown status
FALSEevaluated 517 times by 69 tests
Evaluated by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QChar
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFontDialog
  • tst_QFrame
  • tst_QFtp
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • ...
517-871
2055 QTest::qWarn(qPrintable(-
2056 QString::fromLatin1("testdata %1 could not be located!").arg(base)),-
2057 file, line);-
2058 }
executed 871 times by 4 tests: end of block
Executed by:
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QPluginLoader
  • tst_selftests - unknown status
871
2059 else if (QTestLog::verboseLevel() >= 1) {
QTestLog::verboseLevel() >= 1Description
TRUEnever evaluated
FALSEevaluated 517 times by 69 tests
Evaluated by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QChar
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFontDialog
  • tst_QFrame
  • tst_QFtp
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • ...
0-517
2060 QTestLog::info(qPrintable(-
2061 QString::fromLatin1("testdata %1 was located at %2").arg(base, QDir::toNativeSeparators(found))),-
2062 file, line);-
2063 }
never executed: end of block
0
2064-
2065 return found;
executed 1388 times by 71 tests: return found;
Executed by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QChar
  • tst_QClipboard
  • tst_QComboBox
  • tst_QCryptographicHash
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFontDialog
  • tst_QFrame
  • tst_QFtp
  • tst_QGlyphRun
  • tst_QGraphicsScene
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • ...
1388
2066}-
2067-
2068/*! \internal-
2069 */-
2070QString QTest::qFindTestData(const char *base, const char *file, int line, const char *builddir)-
2071{-
2072 return qFindTestData(QFile::decodeName(base), file, line, builddir);
executed 315 times by 63 tests: return qFindTestData(QFile::decodeName(base), file, line, builddir);
Executed by:
  • tst_QApplication
  • tst_QByteArray
  • tst_QChar
  • tst_QClipboard
  • tst_QComboBox
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDataStream
  • tst_QDirIterator
  • tst_QFactoryLoader
  • tst_QFile
  • tst_QFileSelector
  • tst_QFontDialog
  • tst_QFtp
  • tst_QGlyphRun
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLabel
  • tst_QLayout
  • tst_QLibrary
  • tst_QLocale
  • ...
315
2073}-
2074-
2075/*! \internal-
2076 */-
2077void *QTest::qData(const char *tagName, int typeId)-
2078{-
2079 return fetchData(QTestResult::currentTestData(), tagName, typeId);
executed 424360 times by 326 tests: return fetchData(QTestResult::currentTestData(), tagName, typeId);
Executed 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
424360
2080}-
2081-
2082/*! \internal-
2083 */-
2084void *QTest::qGlobalData(const char *tagName, int typeId)-
2085{-
2086 return fetchData(QTestResult::currentGlobalTestData(), tagName, typeId);
executed 7627 times by 15 tests: return fetchData(QTestResult::currentGlobalTestData(), tagName, typeId);
Executed 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
7627
2087}-
2088-
2089/*! \internal-
2090 */-
2091void *QTest::qElementData(const char *tagName, int metaTypeId)-
2092{-
2093 QTEST_ASSERT(tagName);
never executed: qt_assert("tagName",__FILE__,2093);
!(tagName)Description
TRUEnever evaluated
FALSEevaluated 3248 times by 38 tests
Evaluated by:
  • tst_QAtomicInt
  • tst_QBitArray
  • tst_QByteArray
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDate
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QGroupBox
  • tst_QHashFunctions
  • tst_QHostAddress
  • tst_QNetworkReply
  • tst_QRegExp
  • tst_QRegion
  • tst_QRegularExpressionValidator
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • ...
0-3248
2094 QTestData *data = QTestResult::currentTestData();-
2095 QTEST_ASSERT(data);
never executed: qt_assert("data",__FILE__,2095);
!(data)Description
TRUEnever evaluated
FALSEevaluated 3248 times by 38 tests
Evaluated by:
  • tst_QAtomicInt
  • tst_QBitArray
  • tst_QByteArray
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDate
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QGroupBox
  • tst_QHashFunctions
  • tst_QHostAddress
  • tst_QNetworkReply
  • tst_QRegExp
  • tst_QRegion
  • tst_QRegularExpressionValidator
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • ...
0-3248
2096 QTEST_ASSERT(data->parent());
never executed: qt_assert("data->parent()",__FILE__,2096);
!(data->parent())Description
TRUEnever evaluated
FALSEevaluated 3248 times by 38 tests
Evaluated by:
  • tst_QAtomicInt
  • tst_QBitArray
  • tst_QByteArray
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDate
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QGroupBox
  • tst_QHashFunctions
  • tst_QHostAddress
  • tst_QNetworkReply
  • tst_QRegExp
  • tst_QRegion
  • tst_QRegularExpressionValidator
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • ...
0-3248
2097-
2098 int idx = data->parent()->indexOf(tagName);-
2099 QTEST_ASSERT(idx != -1);
never executed: qt_assert("idx != -1",__FILE__,2099);
!(idx != -1)Description
TRUEnever evaluated
FALSEevaluated 3248 times by 38 tests
Evaluated by:
  • tst_QAtomicInt
  • tst_QBitArray
  • tst_QByteArray
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDate
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QGroupBox
  • tst_QHashFunctions
  • tst_QHostAddress
  • tst_QNetworkReply
  • tst_QRegExp
  • tst_QRegion
  • tst_QRegularExpressionValidator
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • ...
0-3248
2100 QTEST_ASSERT(data->parent()->elementTypeId(idx) == metaTypeId);
never executed: qt_assert("data->parent()->elementTypeId(idx) == metaTypeId",__FILE__,2100);
!(data->parent...== metaTypeId)Description
TRUEnever evaluated
FALSEevaluated 3248 times by 38 tests
Evaluated by:
  • tst_QAtomicInt
  • tst_QBitArray
  • tst_QByteArray
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDate
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QGroupBox
  • tst_QHashFunctions
  • tst_QHostAddress
  • tst_QNetworkReply
  • tst_QRegExp
  • tst_QRegion
  • tst_QRegularExpressionValidator
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • ...
0-3248
2101-
2102 return data->data(data->parent()->indexOf(tagName));
executed 3248 times by 38 tests: return data->data(data->parent()->indexOf(tagName));
Executed by:
  • tst_QAtomicInt
  • tst_QBitArray
  • tst_QByteArray
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusAbstractAdaptor
  • tst_QDBusAbstractInterface
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDate
  • tst_QDialog
  • tst_QDialogButtonBox
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QGroupBox
  • tst_QHashFunctions
  • tst_QHostAddress
  • tst_QNetworkReply
  • tst_QRegExp
  • tst_QRegion
  • tst_QRegularExpressionValidator
  • tst_QRegularExpression_AlwaysOptimize
  • tst_QRegularExpression_DefaultOptimize
  • tst_QRegularExpression_ForceOptimize
  • ...
3248
2103}-
2104-
2105/*! \internal-
2106 */-
2107void QTest::addColumnInternal(int id, const char *name)-
2108{-
2109 QTestTable *tbl = QTestTable::currentTestTable();-
2110 QTEST_ASSERT_X(tbl, "QTest::addColumn()", "Cannot add testdata outside of a _data slot.");
never executed: qt_assert_x("QTest::addColumn()", "Cannot add testdata outside of a _data slot.",__FILE__,2110);
!(tbl)Description
TRUEnever evaluated
FALSEevaluated 9874 times by 332 tests
Evaluated 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
0-9874
2111-
2112 tbl->addColumn(id, name);-
2113}
executed 9874 times by 332 tests: end of block
Executed 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
9874
2114-
2115/*!-
2116 Appends a new row to the current test data. \a dataTag is the name of-
2117 the testdata that will appear in the test output. Returns a QTestData reference-
2118 that can be used to stream in data.-
2119-
2120 Example:-
2121 \snippet code/src_qtestlib_qtestcase.cpp 20-
2122-
2123 \b {Note:} This macro can only be used in a test's data function-
2124 that is invoked by the test framework.-
2125-
2126 See \l {Chapter 2: Data Driven Testing}{Data Driven Testing} for-
2127 a more extensive example.-
2128-
2129 \sa addColumn(), QFETCH()-
2130*/-
2131QTestData &QTest::newRow(const char *dataTag)-
2132{-
2133 QTEST_ASSERT_X(dataTag, "QTest::newRow()", "Data tag can not be null");
never executed: qt_assert_x("QTest::newRow()", "Data tag can not be null",__FILE__,2133);
!(dataTag)Description
TRUEnever evaluated
FALSEevaluated 116514 times by 332 tests
Evaluated 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
0-116514
2134 QTestTable *tbl = QTestTable::currentTestTable();-
2135 QTEST_ASSERT_X(tbl, "QTest::newRow()", "Cannot add testdata outside of a _data slot.");
never executed: qt_assert_x("QTest::newRow()", "Cannot add testdata outside of a _data slot.",__FILE__,2135);
!(tbl)Description
TRUEnever evaluated
FALSEevaluated 116514 times by 332 tests
Evaluated 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
0-116514
2136 QTEST_ASSERT_X(tbl->elementCount(), "QTest::newRow()", "Must add columns before attempting to add rows.");
never executed: qt_assert_x("QTest::newRow()", "Must add columns before attempting to add rows.",__FILE__,2136);
!(tbl->elementCount())Description
TRUEnever evaluated
FALSEevaluated 116514 times by 332 tests
Evaluated 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
0-116514
2137-
2138 return *tbl->newData(dataTag);
executed 116514 times by 332 tests: return *tbl->newData(dataTag);
Executed 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_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • ...
116514
2139}-
2140-
2141/*! \fn void QTest::addColumn(const char *name, T *dummy = 0)-
2142-
2143 Adds a column with type \c{T} to the current test data.-
2144 \a name is the name of the column. \a dummy is a workaround-
2145 for buggy compilers and can be ignored.-
2146-
2147 To populate the column with values, newRow() can be used. Use-
2148 \l QFETCH() to fetch the data in the actual test.-
2149-
2150 Example:-
2151 \snippet code/src_qtestlib_qtestcase.cpp 21-
2152-
2153 To add custom types to the testdata, the type must be registered with-
2154 QMetaType via \l Q_DECLARE_METATYPE().-
2155-
2156 \b {Note:} This macro can only be used in a test's data function-
2157 that is invoked by the test framework.-
2158-
2159 See \l {Chapter 2: Data Driven Testing}{Data Driven Testing} for-
2160 a more extensive example.-
2161-
2162 \sa QTest::newRow(), QFETCH(), QMetaType-
2163*/-
2164-
2165/*!-
2166 Returns the name of the binary that is currently executed.-
2167*/-
2168const char *QTest::currentAppName()-
2169{-
2170 return QTestResult::currentAppName();
executed 54 times by 5 tests: return QTestResult::currentAppName();
Executed by:
  • tst_QCommandLineParser
  • tst_QCoreApplication
  • tst_QGlobal
  • tst_QGuiApplication
  • tst_QSql
54
2171}-
2172-
2173/*!-
2174 Returns the name of the test function that is currently executed.-
2175-
2176 Example:-
2177-
2178 \snippet code/src_qtestlib_qtestcase.cpp 22-
2179*/-
2180const char *QTest::currentTestFunction()-
2181{-
2182 return QTestResult::currentTestFunction();
executed 25284 times by 26 tests: return QTestResult::currentTestFunction();
Executed by:
  • tst_QBoxLayout
  • tst_QDBusThreading
  • tst_QDialog
  • tst_QDirModel
  • tst_QDockWidget
  • tst_QFiledialog
  • tst_QFormLayout
  • tst_QFtp
  • tst_QGestureRecognizer
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QLabel
  • tst_QListView
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenuBar
  • tst_QSpinBox
  • tst_QSqlQuery
  • tst_QToolTip
  • tst_QTouchEvent
  • tst_QTreeView
  • tst_QWaitCondition
  • tst_QWidget
  • tst_QWindow
  • tst_QWindowContainer
  • ...
25284
2183}-
2184-
2185/*!-
2186 Returns the name of the current test data. If the test doesn't-
2187 have any assigned testdata, the function returns 0.-
2188*/-
2189const char *QTest::currentDataTag()-
2190{-
2191 return QTestResult::currentDataTag();
executed 8767 times by 26 tests: return QTestResult::currentDataTag();
Executed by:
  • tst_QDBusMarshall
  • tst_QDBusMetaType
  • tst_QDataStream
  • tst_QDialog
  • tst_QDir
  • tst_QFile
  • tst_QFiledialog
  • tst_QGraphicsAnchorLayout1
  • tst_QGraphicsScene
  • tst_QGridLayout
  • tst_QImage
  • tst_QImageWriter
  • tst_QMainWindow
  • tst_QMdiSubWindow
  • tst_QMenuBar
  • tst_QNetworkReply
  • tst_QNetworkRequest
  • tst_QPixmap
  • tst_QProcess
  • tst_QSettings
  • tst_QShortcut
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QToolTip
  • tst_QUrlInternal
  • ...
8767
2192}-
2193-
2194/*!-
2195 Returns \c true if the current test function failed, otherwise false.-
2196*/-
2197bool QTest::currentTestFailed()-
2198{-
2199 return QTestResult::currentTestFailed();
executed 1444 times by 506 tests: return QTestResult::currentTestFailed();
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
  • ...
1444
2200}-
2201-
2202/*!-
2203 Sleeps for \a ms milliseconds, blocking execution of the-
2204 test. qSleep() will not do any event processing and leave your test-
2205 unresponsive. Network communication might time out while-
2206 sleeping. Use \l qWait() to do non-blocking sleeping.-
2207-
2208 \a ms must be greater than 0.-
2209-
2210 \b {Note:} The qSleep() function calls either \c nanosleep() on-
2211 unix or \c Sleep() on windows, so the accuracy of time spent in-
2212 qSleep() depends on the operating system.-
2213-
2214 Example:-
2215 \snippet code/src_qtestlib_qtestcase.cpp 23-
2216-
2217 \sa qWait()-
2218*/-
2219void QTest::qSleep(int ms)-
2220{-
2221 QTEST_ASSERT(ms > 0);
never executed: qt_assert("ms > 0",__FILE__,2221);
!(ms > 0)Description
TRUEnever evaluated
FALSEevaluated 59223 times by 155 tests
Evaluated by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_Delayed
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusPendingCall
  • ...
0-59223
2222-
2223#if defined(Q_OS_WINRT)-
2224 WaitForSingleObjectEx(GetCurrentThread(), ms, true);-
2225#elif defined(Q_OS_WIN)-
2226 Sleep(uint(ms));-
2227#else-
2228 struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 };-
2229 nanosleep(&ts, NULL);-
2230#endif-
2231}
executed 59223 times by 155 tests: end of block
Executed by:
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QApplication
  • tst_QBackingStore
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCalendarWidget
  • tst_QCheckBox
  • tst_QClipboard
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCommandLinkButton
  • tst_QCompleter
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_Delayed
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusPendingCall
  • ...
59223
2232-
2233/*! \internal-
2234 */-
2235QObject *QTest::testObject()-
2236{-
2237 return currentTestObject;
executed 3 times by 1 test: return currentTestObject;
Executed by:
  • tst_Lancelot
3
2238}-
2239-
2240/*! \internal-
2241 */-
2242void QTest::setMainSourcePath(const char *file, const char *builddir)-
2243{-
2244 QString mainSourceFile = QFile::decodeName(file);-
2245 QFileInfo fi;-
2246 if (builddir)
builddirDescription
TRUEevaluated 739 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
0-739
2247 fi.setFile(QDir(QFile::decodeName(builddir)), mainSourceFile);
executed 739 times by 1 test: fi.setFile(QDir(QFile::decodeName(builddir)), mainSourceFile);
Executed by:
  • tst_selftests - unknown status
739
2248 else-
2249 fi.setFile(mainSourceFile);
never executed: fi.setFile(mainSourceFile);
0
2250 QTest::mainSourcePath = fi.absolutePath();-
2251}
executed 739 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
739
2252-
2253/*! \internal-
2254 This function is called by various specializations of QTest::qCompare-
2255 to decide whether to report a failure and to produce verbose test output.-
2256-
2257 The failureMsg parameter can be null, in which case a default message-
2258 will be output if the compare fails. If the compare succeeds, failureMsg-
2259 will not be output.-
2260-
2261 If the caller has already passed a failure message showing the compared-
2262 values, or if those values cannot be stringified, val1 and val2 can be null.-
2263 */-
2264bool QTest::compare_helper(bool success, const char *failureMsg,-
2265 char *val1, char *val2,-
2266 const char *actual, const char *expected,-
2267 const char *file, int line)-
2268{-
2269 return QTestResult::compare(success, failureMsg, val1, val2, actual, expected, file, line);
executed 39528033 times by 481 tests: return QTestResult::compare(success, failureMsg, val1, val2, actual, expected, file, line);
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • 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
  • tst_QAnimationGroup
  • ...
39528033
2270}-
2271-
2272/*! \fn bool QTest::qCompare(float const &t1, float const &t2, const char *actual, const char *expected, const char *file, int line)-
2273 \internal-
2274 */-
2275bool QTest::qCompare(float const &t1, float const &t2, const char *actual, const char *expected,-
2276 const char *file, int line)-
2277{-
2278 return compare_helper(qFuzzyCompare(t1, t2), "Compared floats are not the same (fuzzy compare)",
executed 2195 times by 18 tests: return compare_helper(qFuzzyCompare(t1, t2), "Compared floats are not the same (fuzzy compare)", toString(t1), toString(t2), actual, expected, file, line);
Executed by:
  • tst_QDataStream
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGraphicsAnchorLayout1
  • tst_QGraphicsItem
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QMatrixNxN
  • tst_QMetaType
  • tst_QObject
  • tst_QPair
  • tst_QQuaternion
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
  • tst_QVariant
  • tst_QVectorND
  • tst_selftests - unknown status
2195
2279 toString(t1), toString(t2), actual, expected, file, line);
executed 2195 times by 18 tests: return compare_helper(qFuzzyCompare(t1, t2), "Compared floats are not the same (fuzzy compare)", toString(t1), toString(t2), actual, expected, file, line);
Executed by:
  • tst_QDataStream
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGraphicsAnchorLayout1
  • tst_QGraphicsItem
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QMatrixNxN
  • tst_QMetaType
  • tst_QObject
  • tst_QPair
  • tst_QQuaternion
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
  • tst_QVariant
  • tst_QVectorND
  • tst_selftests - unknown status
2195
2280}-
2281-
2282/*! \fn bool QTest::qCompare(double const &t1, double const &t2, const char *actual, const char *expected, const char *file, int line)-
2283 \internal-
2284 */-
2285bool QTest::qCompare(double const &t1, double const &t2, const char *actual, const char *expected,-
2286 const char *file, int line)-
2287{-
2288 return compare_helper(qFuzzyCompare(t1, t2), "Compared doubles are not the same (fuzzy compare)",
executed 2182864 times by 80 tests: return compare_helper(qFuzzyCompare(t1, t2), "Compared doubles are not the same (fuzzy compare)", toString(t1), toString(t2), actual, expected, file, line);
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_QBrush
  • tst_QColor
  • tst_QComboBox
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QEasingCurve
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsAnchorLayout1
  • tst_QGraphicsEffect
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsLayoutItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsObject
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsTransform
  • ...
2182864
2289 toString(t1), toString(t2), actual, expected, file, line);
executed 2182864 times by 80 tests: return compare_helper(qFuzzyCompare(t1, t2), "Compared doubles are not the same (fuzzy compare)", toString(t1), toString(t2), actual, expected, file, line);
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_QBrush
  • tst_QColor
  • tst_QComboBox
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QEasingCurve
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsAnchorLayout1
  • tst_QGraphicsEffect
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsLayoutItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsObject
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsTransform
  • ...
2182864
2290}-
2291-
2292/*! \fn bool QTest::qCompare(double const &t1, float const &t2, const char *actual, const char *expected, const char *file, int line)-
2293 \internal-
2294 */-
2295-
2296/*! \fn bool QTest::qCompare(float const &t1, double const &t2, const char *actual, const char *expected, const char *file, int line)-
2297 \internal-
2298 */-
2299-
2300#define TO_STRING_IMPL(TYPE, FORMAT) \-
2301template <> Q_TESTLIB_EXPORT char *QTest::toString<TYPE >(const TYPE &t) \-
2302{ \-
2303 char *msg = new char[128]; \-
2304 qsnprintf(msg, 128, #FORMAT, t); \-
2305 return msg; \-
2306}-
2307-
2308TO_STRING_IMPL(short, %hd)
executed 6688 times by 12 tests: return msg;
Executed by:
  • tst_Compiler
  • tst_QAtomicInteger_short
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QIODevice
  • tst_QMetaType
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
  • tst_QVariant
  • tst_QtEndian
6688
2309TO_STRING_IMPL(ushort, %hu)
executed 4734 times by 28 tests: return msg;
Executed by:
  • tst_Collections
  • tst_PlatformSocketEngine
  • tst_QAbstractSocket
  • tst_QAtomicInteger_ushort
  • tst_QColor
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QHttpNetworkConnection
  • tst_QHttpSocketEngine
  • tst_QImage
  • tst_QMetaType
  • tst_QNetworkProxy
  • tst_QNetworkProxyFactory
  • tst_QNumeric
  • tst_QSocks5SocketEngine
  • tst_QSqlQuery
  • tst_QSslSocket
  • tst_QString
  • tst_QStringRef
  • tst_QTcpServer
  • tst_QTcpSocket
  • tst_QTextDocumentFragment
  • tst_QTextLayout
  • tst_QTextScriptEngine
  • tst_QTextStream
  • ...
4734
2310TO_STRING_IMPL(int, %d)
executed 34326128 times by 392 tests: return msg;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_LargeFile
  • tst_ModelTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAtomicInt
  • ...
34326128
2311TO_STRING_IMPL(uint, %u)
executed 4863032 times by 71 tests: return msg;
Executed by:
  • tst_Compiler
  • tst_QAbstractButton
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAccessibility
  • tst_QAlgorithms
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAtomicInteger_uint
  • tst_QByteArray
  • tst_QCheckBox
  • tst_QColor
  • tst_QCommandLinkButton
  • tst_QCoreApplication
  • tst_QDBusConnection
  • tst_QDBusConnection_SpyHook
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDateTimeEdit
  • tst_QDir
  • tst_QFont
  • tst_QFontMetrics
  • tst_QGLBuffer
  • tst_QGlyphRun
  • ...
4863032
2312TO_STRING_IMPL(long, %ld)
executed 8976 times by 10 tests: return msg;
Executed by:
  • tst_Compiler
  • tst_LargeFile
  • tst_QAtomicInteger_long
  • tst_QFile
  • tst_QMetaType
  • tst_QSignalSpy
  • tst_QSslSocket
  • tst_QString
  • tst_QStringRef
  • tst_QVariant
8976
2313TO_STRING_IMPL(ulong, %lu)
executed 8132 times by 19 tests: return msg;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAtomicInt
  • tst_QAtomicInteger_ulong
  • tst_QByteArray
  • tst_QGlobal
  • tst_QMetaType
  • tst_QNumeric
  • tst_QScopedPointer
  • tst_QSharedPointer
  • tst_QString
  • tst_QStringRef
  • tst_QTouchEvent
  • tst_QVariant
  • tst_QtConcurrentFilter
  • tst_QtConcurrentMap
  • tst_toolsupport
8132
2314#if defined(Q_OS_WIN)-
2315TO_STRING_IMPL(qint64, %I64d)-
2316TO_STRING_IMPL(quint64, %I64u)-
2317#else-
2318TO_STRING_IMPL(qint64, %lld)
executed 1599344 times by 63 tests: return msg;
Executed by:
  • tst_LargeFile
  • tst_PlatformSocketEngine
  • tst_QAbstractFileEngine
  • tst_QAbstractSocket
  • tst_QAsn1Element
  • tst_QAtomicInteger_qlonglong
  • tst_QAtomicInteger_qptrdiff
  • tst_QBuffer
  • tst_QByteDataBuffer
  • tst_QComboBox
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDate
  • tst_QDateTime
  • tst_QDialogButtonBox
  • tst_QElapsedTimer
  • tst_QFile
  • tst_QFileInfo
  • tst_QFtp
  • tst_QHash
  • tst_QHash_StrictIterators
  • tst_QHttpNetworkConnection
  • tst_QHttpNetworkReply
  • tst_QHttpSocketEngine
  • ...
1599344
2319TO_STRING_IMPL(quint64, %llu)
executed 22208 times by 19 tests: return msg;
Executed by:
  • tst_Collections
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAtomicInteger_quintptr
  • tst_QAtomicInteger_qulonglong
  • tst_QByteArray
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QHooks
  • tst_QMetaType
  • tst_QNumeric
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
  • tst_QVariant
  • tst_QWidget
  • tst_QWidget_window
  • tst_QtEndian
22208
2320#endif-
2321TO_STRING_IMPL(bool, %d)
executed 280722 times by 235 tests: return msg;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractProxyModel
  • tst_QAbstractSpinBox
  • tst_QAccessibility
  • tst_QActionGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAsn1Element
  • tst_QAtomicInt
  • tst_QAtomicInteger_char
  • tst_QAtomicInteger_char16_t
  • tst_QAtomicInteger_char32_t
  • tst_QAtomicInteger_int
  • tst_QAtomicInteger_long
  • tst_QAtomicInteger_qlonglong
  • tst_QAtomicInteger_qptrdiff
  • tst_QAtomicInteger_quintptr
  • tst_QAtomicInteger_qulonglong
  • tst_QAtomicInteger_schar
  • ...
280722
2322TO_STRING_IMPL(signed char, %hhd)
executed 4462 times by 7 tests: return msg;
Executed by:
  • tst_QAtomicInteger_schar
  • tst_QDataStream
  • tst_QFile
  • tst_QIODevice
  • tst_QMetaType
  • tst_QVariant
  • tst_QtEndian
4462
2323TO_STRING_IMPL(unsigned char, %hhu)
executed 17080 times by 16 tests: return msg;
Executed by:
  • tst_QAsn1Element
  • tst_QAtomicInteger_uchar
  • tst_QBuffer
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QFile
  • tst_QList
  • tst_QList_StrictIterators
  • tst_QMetaType
  • tst_QNumeric
  • tst_QPixelFormat
  • tst_QSettings
  • tst_QVariant
  • tst_QtEndian
  • tst_qlist - unknown status
  • tst_qlist_strictiterators - unknown status
17080
2324TO_STRING_IMPL(float, %g)
executed 4390 times by 18 tests: return msg;
Executed by:
  • tst_QDataStream
  • tst_QGLBuffer
  • tst_QGLFunctions
  • tst_QGraphicsAnchorLayout1
  • tst_QGraphicsItem
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QMatrixNxN
  • tst_QMetaType
  • tst_QObject
  • tst_QPair
  • tst_QQuaternion
  • tst_QString
  • tst_QStringRef
  • tst_QTextStream
  • tst_QVariant
  • tst_QVectorND
  • tst_selftests - unknown status
4390
2325TO_STRING_IMPL(double, %lg)
executed 4365778 times by 81 tests: return msg;
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_QBrush
  • tst_QColor
  • tst_QComboBox
  • tst_QComplexText
  • tst_QCssParser
  • tst_QDBusPendingReply
  • tst_QDBusReply
  • tst_QDataStream
  • tst_QDoubleSpinBox
  • tst_QDoubleValidator
  • tst_QEasingCurve
  • tst_QFontDialog
  • tst_QGraphicsAnchorLayout
  • tst_QGraphicsAnchorLayout1
  • tst_QGraphicsEffect
  • tst_QGraphicsGridLayout
  • tst_QGraphicsItem
  • tst_QGraphicsItemAnimation
  • tst_QGraphicsLayoutItem
  • tst_QGraphicsLinearLayout
  • tst_QGraphicsObject
  • tst_QGraphicsProxyWidget
  • tst_QGraphicsTransform
  • ...
4365778
2326-
2327template <> Q_TESTLIB_EXPORT char *QTest::toString<char>(const char &t)-
2328{-
2329 unsigned char c = static_cast<unsigned char>(t);-
2330 char *msg = new char[16];-
2331 switch (c) {-
2332 case 0x00:
executed 2582 times by 14 tests: case 0x00:
Executed by:
  • tst_Compiler
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAtomicInteger_char
  • tst_QBuffer
  • tst_QDataStream
  • tst_QFile
  • tst_QIODevice
  • tst_QProcess
  • tst_QSharedMemory
  • tst_QSslSocket
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_QVariant
2582
2333 qstrcpy(msg, "'\\0'");-
2334 break;
executed 2582 times by 14 tests: break;
Executed by:
  • tst_Compiler
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAtomicInteger_char
  • tst_QBuffer
  • tst_QDataStream
  • tst_QFile
  • tst_QIODevice
  • tst_QProcess
  • tst_QSharedMemory
  • tst_QSslSocket
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_QVariant
2582
2335 case 0x07:
executed 2 times by 1 test: case 0x07:
Executed by:
  • tst_QFile
2
2336 qstrcpy(msg, "'\\a'");-
2337 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_QFile
2
2338 case 0x08:
executed 2 times by 1 test: case 0x08:
Executed by:
  • tst_QFile
2
2339 qstrcpy(msg, "'\\b'");-
2340 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_QFile
2
2341 case 0x09:
executed 2 times by 1 test: case 0x09:
Executed by:
  • tst_QFile
2
2342 qstrcpy(msg, "'\\t'");-
2343 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_QFile
2
2344 case 0x0a:
executed 4418 times by 8 tests: case 0x0a:
Executed by:
  • tst_QAtomicInteger_char
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QRingBuffer
  • tst_QSizePolicy
  • tst_QTcpSocket
  • tst_QTextStream
4418
2345 qstrcpy(msg, "'\\n'");-
2346 break;
executed 4418 times by 8 tests: break;
Executed by:
  • tst_QAtomicInteger_char
  • tst_QBuffer
  • tst_QFile
  • tst_QIODevice
  • tst_QRingBuffer
  • tst_QSizePolicy
  • tst_QTcpSocket
  • tst_QTextStream
4418
2347 case 0x0b:
executed 2 times by 1 test: case 0x0b:
Executed by:
  • tst_QFile
2
2348 qstrcpy(msg, "'\\v'");-
2349 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_QFile
2
2350 case 0x0c:
executed 2 times by 1 test: case 0x0c:
Executed by:
  • tst_QFile
2
2351 qstrcpy(msg, "'\\f'");-
2352 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_QFile
2
2353 case 0x0d:
executed 16 times by 3 tests: case 0x0d:
Executed by:
  • tst_QFile
  • tst_QIODevice
  • tst_QTcpSocket
16
2354 qstrcpy(msg, "'\\r'");-
2355 break;
executed 16 times by 3 tests: break;
Executed by:
  • tst_QFile
  • tst_QIODevice
  • tst_QTcpSocket
16
2356 case 0x22:
executed 4 times by 2 tests: case 0x22:
Executed by:
  • tst_Compiler
  • tst_QFile
4
2357 qstrcpy(msg, "'\\\"'");-
2358 break;
executed 4 times by 2 tests: break;
Executed by:
  • tst_Compiler
  • tst_QFile
4
2359 case 0x27:
executed 2 times by 1 test: case 0x27:
Executed by:
  • tst_QFile
2
2360 qstrcpy(msg, "'\\\''");-
2361 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_QFile
2
2362 case 0x5c:
executed 2 times by 1 test: case 0x5c:
Executed by:
  • tst_QFile
2
2363 qstrcpy(msg, "'\\\\'");-
2364 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_QFile
2
2365 default:
executed 3514306 times by 24 tests: default:
Executed by:
  • tst_PlatformSocketEngine
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAtomicInteger_char
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QDataStream
  • tst_QFile
  • tst_QIODevice
  • tst_QMetaType
  • tst_QRingBuffer
  • tst_QSemaphore
  • tst_QSharedMemory
  • tst_QSizePolicy
  • tst_QSslSocket
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QVector
  • tst_QVector_StrictIterators
3514306
2366 if (c < 0x20 || c >= 0x7F)
c < 0x20Description
TRUEevaluated 434 times by 3 tests
Evaluated by:
  • tst_QAtomicInteger_char
  • tst_QFile
  • tst_QSizePolicy
FALSEevaluated 3513872 times by 24 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAtomicInteger_char
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QDataStream
  • tst_QFile
  • tst_QIODevice
  • tst_QMetaType
  • tst_QRingBuffer
  • tst_QSemaphore
  • tst_QSharedMemory
  • tst_QSizePolicy
  • tst_QSslSocket
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QVector
  • tst_QVector_StrictIterators
c >= 0x7FDescription
TRUEevaluated 8656 times by 3 tests
Evaluated by:
  • tst_QAtomicInteger_char
  • tst_QTextCodec
  • tst_QTextStream
FALSEevaluated 3505216 times by 23 tests
Evaluated by:
  • tst_PlatformSocketEngine
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAtomicInteger_char
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QDataStream
  • tst_QFile
  • tst_QIODevice
  • tst_QMetaType
  • tst_QRingBuffer
  • tst_QSemaphore
  • tst_QSharedMemory
  • tst_QSizePolicy
  • tst_QSslSocket
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QVector
  • tst_QVector_StrictIterators
434-3513872
2367 qsnprintf(msg, 16, "'\\x%02x'", c);
executed 9090 times by 5 tests: qsnprintf(msg, 16, "'\\x%02x'", c);
Executed by:
  • tst_QAtomicInteger_char
  • tst_QFile
  • tst_QSizePolicy
  • tst_QTextCodec
  • tst_QTextStream
9090
2368 else-
2369 qsnprintf(msg, 16, "'%c'" , c);
executed 3505216 times by 23 tests: qsnprintf(msg, 16, "'%c'" , c);
Executed by:
  • tst_PlatformSocketEngine
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAtomicInteger_char
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QDataStream
  • tst_QFile
  • tst_QIODevice
  • tst_QMetaType
  • tst_QRingBuffer
  • tst_QSemaphore
  • tst_QSharedMemory
  • tst_QSizePolicy
  • tst_QSslSocket
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QVector
  • tst_QVector_StrictIterators
3505216
2370 }-
2371 return msg;
executed 3521340 times by 26 tests: return msg;
Executed by:
  • tst_Compiler
  • tst_PlatformSocketEngine
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAtomicInteger_char
  • tst_QBuffer
  • tst_QByteArray
  • tst_QByteDataBuffer
  • tst_QDataStream
  • tst_QFile
  • tst_QIODevice
  • tst_QMetaType
  • tst_QProcess
  • tst_QRingBuffer
  • tst_QSemaphore
  • tst_QSharedMemory
  • tst_QSizePolicy
  • tst_QSslSocket
  • tst_QString
  • tst_QTcpSocket
  • tst_QTextCodec
  • tst_QTextStream
  • tst_QUdpSocket
  • tst_QVariant
  • tst_QVector
  • ...
3521340
2372}-
2373-
2374/*! \internal-
2375 */-
2376char *QTest::toString(const char *str)-
2377{-
2378 if (!str)
!strDescription
TRUEevaluated 20 times by 3 tests
Evaluated by:
  • tst_QByteArray
  • tst_QVariant
  • tst_qmessagehandler
FALSEevaluated 2890 times by 44 tests
Evaluated by:
  • tst_Compiler
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAtomicPointer
  • tst_QAuthenticator
  • tst_QByteArray
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusMetaObject
  • tst_QFile
  • tst_QGlobal
  • tst_QGraphicsView
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QItemEditorFactory
  • tst_QLogging
  • tst_QMetaEnum
  • tst_QMetaMethod
  • tst_QMetaObject
  • tst_QMetaType
  • ...
20-2890
2379 return 0;
executed 20 times by 3 tests: return 0;
Executed by:
  • tst_QByteArray
  • tst_QVariant
  • tst_qmessagehandler
20
2380 char *msg = new char[strlen(str) + 1];-
2381 return qstrcpy(msg, str);
executed 2890 times by 44 tests: return qstrcpy(msg, str);
Executed by:
  • tst_Compiler
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAtomicPointer
  • tst_QAuthenticator
  • tst_QByteArray
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusMetaObject
  • tst_QFile
  • tst_QGlobal
  • tst_QGraphicsView
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QItemEditorFactory
  • tst_QLogging
  • tst_QMetaEnum
  • tst_QMetaMethod
  • tst_QMetaObject
  • tst_QMetaType
  • ...
2890
2382}-
2383-
2384/*! \internal-
2385 */-
2386char *QTest::toString(const void *p)-
2387{-
2388 char *msg = new char[128];-
2389 qsnprintf(msg, 128, "%p", p);-
2390 return msg;
executed 3263510 times by 173 tests: return msg;
Executed by:
  • tst_Collections
  • tst_Gestures
  • tst_QAbstractAnimation
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAnimationGroup
  • tst_QApplication
  • tst_QArrayData
  • tst_QArrayData_StrictIterators
  • tst_QAtomicPointer
  • tst_QBoxLayout
  • tst_QButtonGroup
  • tst_QCache
  • tst_QClipboard
  • tst_QColorDialog
  • tst_QColumnView
  • tst_QComboBox
  • ...
3263510
2391}-
2392-
2393/*! \internal-
2394 */-
2395bool QTest::compare_string_helper(const char *t1, const char *t2, const char *actual,-
2396 const char *expected, const char *file, int line)-
2397{-
2398 return compare_helper(qstrcmp(t1, t2) == 0, "Compared strings are not the same",
executed 1455 times by 44 tests: return compare_helper(qstrcmp(t1, t2) == 0, "Compared strings are not the same", toString(t1), toString(t2), actual, expected, file, line);
Executed by:
  • tst_Compiler
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAtomicPointer
  • tst_QAuthenticator
  • tst_QByteArray
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusMetaObject
  • tst_QFile
  • tst_QGlobal
  • tst_QGraphicsView
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QItemEditorFactory
  • tst_QLogging
  • tst_QMetaEnum
  • tst_QMetaMethod
  • tst_QMetaObject
  • tst_QMetaType
  • ...
1455
2399 toString(t1), toString(t2), actual, expected, file, line);
executed 1455 times by 44 tests: return compare_helper(qstrcmp(t1, t2) == 0, "Compared strings are not the same", toString(t1), toString(t2), actual, expected, file, line);
Executed by:
  • tst_Compiler
  • tst_PlatformSocketEngine
  • tst_QAbstractItemView
  • tst_QAtomicPointer
  • tst_QAuthenticator
  • tst_QByteArray
  • tst_QDBusAbstractAdaptor
  • tst_QDBusConnection
  • tst_QDBusConnection_NoApplication
  • tst_QDBusConnection_SpyHook
  • tst_QDBusInterface
  • tst_QDBusMarshall
  • tst_QDBusMetaObject
  • tst_QFile
  • tst_QGlobal
  • tst_QGraphicsView
  • tst_QHttpSocketEngine
  • tst_QIODevice
  • tst_QIcoImageFormat
  • tst_QItemEditorFactory
  • tst_QLogging
  • tst_QMetaEnum
  • tst_QMetaMethod
  • tst_QMetaObject
  • tst_QMetaType
  • ...
1455
2400}-
2401-
2402/*!-
2403 \namespace QTest::Internal-
2404 \internal-
2405*/-
2406-
2407/*! \fn bool QTest::compare_ptr_helper(const void *t1, const void *t2, const char *actual, const char *expected, const char *file, int line);-
2408 \internal-
2409*/-
2410-
2411/*! \fn bool QTest::qCompare(T1 const &, T2 const &, const char *, const char *, const char *, int);-
2412 \internal-
2413*/-
2414-
2415/*! \fn bool QTest::qCompare(QIcon const &t1, QIcon const &t2, const char *actual, const char *expected, const char *file, int line)-
2416 \internal-
2417*/-
2418-
2419/*! \fn bool QTest::qCompare(QImage const &t1, QImage const &t2, const char *actual, const char *expected, const char *file, int line)-
2420 \internal-
2421*/-
2422-
2423/*! \fn bool QTest::qCompare(QPixmap const &t1, QPixmap const &t2, const char *actual, const char *expected, const char *file, int line)-
2424 \internal-
2425*/-
2426-
2427/*! \fn bool QTest::qCompare(T const &t1, T const &t2, const char *actual, const char *expected, const char *file, int line)-
2428 \internal-
2429*/-
2430-
2431/*! \fn bool QTest::qCompare(const T *t1, const T *t2, const char *actual, const char *expected, const char *file, int line)-
2432 \internal-
2433*/-
2434-
2435/*! \fn bool QTest::qCompare(T *t1, T *t2, const char *actual, const char *expected, const char *file, int line)-
2436 \internal-
2437*/-
2438-
2439/*! \fn bool QTest::qCompare(const T1 *t1, const T2 *t2, const char *actual, const char *expected, const char *file, int line)-
2440 \internal-
2441*/-
2442-
2443/*! \fn bool QTest::qCompare(T1 *t1, T2 *t2, const char *actual, const char *expected, const char *file, int line)-
2444 \internal-
2445*/-
2446-
2447/*! \fn bool QTest::qCompare(const char *t1, const char *t2, const char *actual, const char *expected, const char *file, int line)-
2448 \internal-
2449*/-
2450-
2451/*! \fn bool QTest::qCompare(char *t1, char *t2, const char *actual, const char *expected, const char *file, int line)-
2452 \internal-
2453*/-
2454-
2455/*! \fn bool QTest::qCompare(char *t1, const char *t2, const char *actual, const char *expected, const char *file, int line)-
2456 \internal-
2457*/-
2458-
2459/*! \fn bool QTest::qCompare(const char *t1, char *t2, const char *actual, const char *expected, const char *file, int line)-
2460 \internal-
2461*/-
2462-
2463/*! \fn bool QTest::qCompare(QString const &t1, QLatin1String const &t2, const char *actual, const char *expected, const char *file, int line)-
2464 \internal-
2465*/-
2466-
2467/*! \fn bool QTest::qCompare(QLatin1String const &t1, QString const &t2, const char *actual, const char *expected, const char *file, int line)-
2468 \internal-
2469*/-
2470-
2471/*! \fn bool QTest::qCompare(QStringList const &t1, QStringList const &t2, const char *actual, const char *expected, const char *file, int line)-
2472 \internal-
2473*/-
2474-
2475/*! \fn bool QTest::qCompare(QList<T> const &t1, QList<T> const &t2, const char *actual, const char *expected, const char *file, int line)-
2476 \internal-
2477*/-
2478-
2479/*! \fn bool QTest::qCompare(QFlags<T> const &t1, T const &t2, const char *actual, const char *expected, const char *file, int line)-
2480 \internal-
2481*/-
2482-
2483/*! \fn bool QTest::qCompare(QFlags<T> const &t1, int const &t2, const char *actual, const char *expected, const char *file, int line)-
2484 \internal-
2485*/-
2486-
2487/*! \fn bool QTest::qCompare(qint64 const &t1, qint32 const &t2, const char *actual, const char *expected, const char *file, int line)-
2488 \internal-
2489*/-
2490-
2491/*! \fn bool QTest::qCompare(qint64 const &t1, quint32 const &t2, const char *actual, const char *expected, const char *file, int line)-
2492 \internal-
2493*/-
2494-
2495/*! \fn bool QTest::qCompare(quint64 const &t1, quint32 const &t2, const char *actual, const char *expected, const char *file, int line)-
2496 \internal-
2497*/-
2498-
2499/*! \fn bool QTest::qCompare(qint32 const &t1, qint64 const &t2, const char *actual, const char *expected, const char *file, int line)-
2500 \internal-
2501*/-
2502-
2503/*! \fn bool QTest::qCompare(quint32 const &t1, qint64 const &t2, const char *actual, const char *expected, const char *file, int line)-
2504 \internal-
2505*/-
2506-
2507/*! \fn bool QTest::qCompare(quint32 const &t1, quint64 const &t2, const char *actual, const char *expected, const char *file, int line)-
2508 \internal-
2509*/-
2510-
2511/*! \fn bool QTest::qTest(const T& actual, const char *elementName, const char *actualStr, const char *expected, const char *file, int line)-
2512 \internal-
2513*/-
2514-
2515/*! \fn void QTest::sendKeyEvent(KeyAction action, QWidget *widget, Qt::Key code, QString text, Qt::KeyboardModifiers modifier, int delay=-1)-
2516 \internal-
2517*/-
2518-
2519/*! \fn void QTest::sendKeyEvent(KeyAction action, QWindow *window, Qt::Key code, QString text, Qt::KeyboardModifiers modifier, int delay=-1)-
2520 \internal-
2521*/-
2522-
2523/*! \fn void QTest::sendKeyEvent(KeyAction action, QWidget *widget, Qt::Key code, char ascii, Qt::KeyboardModifiers modifier, int delay=-1)-
2524 \internal-
2525*/-
2526-
2527/*! \fn void QTest::sendKeyEvent(KeyAction action, QWindow *window, Qt::Key code, char ascii, Qt::KeyboardModifiers modifier, int delay=-1)-
2528 \internal-
2529*/-
2530-
2531/*! \fn void QTest::simulateEvent(QWidget *widget, bool press, int code, Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay=-1)-
2532 \internal-
2533*/-
2534-
2535/*! \fn void QTest::simulateEvent(QWindow *window, bool press, int code, Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay=-1)-
2536 \internal-
2537*/-
2538-
2539QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9