qtesttable.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/testlib/qtesttable.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2015 The Qt Company Ltd.-
4** Contact: http://www.qt.io/licensing/-
5**-
6** This file is part of the QtTest module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL21$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see http://www.qt.io/terms-conditions. For further-
15** information use the contact form at http://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 2.1 or version 3 as published by the Free-
20** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
21** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
22** following information to ensure the GNU Lesser General Public License-
23** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
24** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
25**-
26** As a special exception, The Qt Company gives you certain additional-
27** rights. These rights are described in The Qt Company LGPL Exception-
28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
29**-
30** $QT_END_LICENSE$-
31**-
32****************************************************************************/-
33-
34#include <QtTest/private/qtesttable_p.h>-
35#include <QtTest/qtestdata.h>-
36#include <QtTest/qtestassert.h>-
37-
38#include <QtCore/qmetaobject.h>-
39-
40#include <string.h>-
41#include <vector>-
42#include <algorithm>-
43-
44QT_BEGIN_NAMESPACE-
45-
46class QTestTablePrivate-
47{-
48public:-
49 ~QTestTablePrivate()-
50 {-
51 qDeleteAll(dataList.begin(), dataList.end());-
52 }
executed 14242 times by 540 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
14242
53-
54 struct Element {-
55 Element() : name(Q_NULLPTR), type(0) {}
never executed: end of block
0
56 Element(const char *n, int t) : name(n), type(t) {}
executed 9908 times by 365 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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
9908
57-
58 const char *name;-
59 int type;-
60 };-
61-
62 typedef std::vector<Element> ElementList;-
63 ElementList elementList;-
64-
65 typedef std::vector<QTestData *> DataList;-
66 DataList dataList;-
67-
68 void addColumn(int elemType, const char *elemName) { elementList.push_back(Element(elemName, elemType)); }
executed 9908 times by 365 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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
9908
69 void addRow(QTestData *data) { dataList.push_back(data); }
executed 120645 times by 365 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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
120645
70-
71 static QTestTable *currentTestTable;-
72 static QTestTable *gTable;-
73};-
74-
75QTestTable *QTestTablePrivate::currentTestTable = 0;-
76QTestTable *QTestTablePrivate::gTable = 0;-
77-
78void QTestTable::addColumn(int type, const char *name)-
79{-
80 QTEST_ASSERT(type);
never executed: qt_assert("type",__FILE__,80);
!(type)Description
TRUEnever evaluated
FALSEevaluated 9908 times by 365 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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
0-9908
81 QTEST_ASSERT(name);
never executed: qt_assert("name",__FILE__,81);
!(name)Description
TRUEnever evaluated
FALSEevaluated 9908 times by 365 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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
0-9908
82-
83 d->addColumn(type, name);-
84}
executed 9908 times by 365 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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
9908
85-
86int QTestTable::elementCount() const-
87{-
88 return int(d->elementList.size());
executed 1243890 times by 365 tests: return int(d->elementList.size());
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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
1243890
89}-
90-
91int QTestTable::dataCount() const-
92{-
93 return int(d->dataList.size());
executed 26855 times by 535 tests: return int(d->dataList.size());
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
  • ...
26855
94}-
95-
96bool QTestTable::isEmpty() const-
97{-
98 return d->elementList.empty();
executed 13918 times by 535 tests: return d->elementList.empty();
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
  • ...
13918
99}-
100-
101QTestData *QTestTable::newData(const char *tag)-
102{-
103 QTestData *dt = new QTestData(tag, this);-
104 d->addRow(dt);-
105 return dt;
executed 120645 times by 365 tests: return dt;
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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
120645
106}-
107-
108QTestTable::QTestTable()-
109{-
110 d = new QTestTablePrivate;-
111 QTestTablePrivate::currentTestTable = this;-
112}
executed 14365 times by 540 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
14365
113-
114QTestTable::~QTestTable()-
115{-
116 QTestTablePrivate::currentTestTable = 0;-
117 delete d;-
118}
executed 14242 times by 540 tests: end of block
Executed by:
  • tst_Collections
  • tst_Compiler
  • tst_Gestures
  • tst_Lancelot
  • tst_LargeFile
  • tst_ModelTest
  • tst_NetworkSelfTest
  • tst_PlatformSocketEngine
  • tst_QAbstractAnimation
  • tst_QAbstractButton
  • tst_QAbstractFileEngine
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractNetworkCache
  • tst_QAbstractPrintDialog
  • tst_QAbstractProxyModel
  • tst_QAbstractScrollArea
  • tst_QAbstractSlider
  • tst_QAbstractSocket
  • tst_QAbstractSpinBox
  • tst_QAbstractTextDocumentLayout
  • tst_QAccessibility
  • tst_QAction
  • tst_QActionGroup
  • tst_QAlgorithms
  • ...
14242
119-
120int QTestTable::elementTypeId(int index) const-
121{-
122 return size_t(index) < d->elementList.size() ? d->elementList[index].type : -1;
executed 1323370 times by 365 tests: return size_t(index) < d->elementList.size() ? d->elementList[index].type : -1;
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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
size_t(index) ...entList.size()Description
TRUEevaluated 1323370 times by 365 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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
FALSEnever evaluated
0-1323370
123}-
124-
125const char *QTestTable::dataTag(int index) const-
126{-
127 return size_t(index) < d->elementList.size() ? d->elementList[index].name : Q_NULLPTR;
never executed: return size_t(index) < d->elementList.size() ? d->elementList[index].name : nullptr;
size_t(index) ...entList.size()Description
TRUEnever evaluated
FALSEnever evaluated
0
128}-
129-
130QTestData *QTestTable::testData(int index) const-
131{-
132 return size_t(index) < d->dataList.size() ? d->dataList[index] : Q_NULLPTR;
executed 244220 times by 365 tests: return size_t(index) < d->dataList.size() ? d->dataList[index] : nullptr;
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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
size_t(index) ...ataList.size()Description
TRUEevaluated 244220 times by 365 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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
FALSEnever evaluated
0-244220
133}-
134-
135class NamePredicate : public std::unary_function<QTestTablePrivate::Element, bool>-
136{-
137public:-
138 explicit NamePredicate(const char *needle) : m_needle(needle) {}
executed 443771 times by 364 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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
443771
139-
140 bool operator()(const QTestTablePrivate::Element &e) const-
141 { return !strcmp(e.name, m_needle); }
executed 1553578 times by 364 tests: return !strcmp(e.name, m_needle);
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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
1553578
142-
143private:-
144 const char *m_needle;-
145};-
146-
147int QTestTable::indexOf(const char *elementName) const-
148{-
149 typedef QTestTablePrivate::ElementList::const_iterator It;-
150-
151 QTEST_ASSERT(elementName);
never executed: qt_assert("elementName",__FILE__,151);
!(elementName)Description
TRUEnever evaluated
FALSEevaluated 443771 times by 364 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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
0-443771
152-
153 const QTestTablePrivate::ElementList &elementList = d->elementList;-
154-
155 const It it = std::find_if(elementList.begin(), elementList.end(),-
156 NamePredicate(elementName));-
157 return it != elementList.end() ?
executed 443771 times by 364 tests: return it != elementList.end() ? int(it - elementList.begin()) : -1;
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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
it != elementList.end()Description
TRUEevaluated 443750 times by 364 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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
FALSEevaluated 21 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
21-443771
158 int(it - elementList.begin()) : -1;
executed 443771 times by 364 tests: return it != elementList.end() ? int(it - elementList.begin()) : -1;
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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
443771
159}-
160-
161QTestTable *QTestTable::globalTestTable()-
162{-
163 if (!QTestTablePrivate::gTable)
!QTestTablePrivate::gTableDescription
TRUEevaluated 1241 times by 539 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 13116 times by 535 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
  • ...
1241-13116
164 QTestTablePrivate::gTable = new QTestTable();
executed 1241 times by 539 tests: QTestTablePrivate::gTable = new QTestTable();
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
  • ...
1241
165 return QTestTablePrivate::gTable;
executed 14357 times by 540 tests: return QTestTablePrivate::gTable;
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
  • ...
14357
166}-
167-
168void QTestTable::clearGlobalTestTable()-
169{-
170 delete QTestTablePrivate::gTable;-
171 QTestTablePrivate::gTable = 0;-
172}
executed 1167 times by 538 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
  • ...
1167
173-
174QTestTable *QTestTable::currentTestTable()-
175{-
176 return QTestTablePrivate::currentTestTable;
executed 130553 times by 365 tests: return QTestTablePrivate::currentTestTable;
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_Gcc_char
  • tst_QAtomicInteger_Gcc_char16_t
  • tst_QAtomicInteger_Gcc_char32_t
  • tst_QAtomicInteger_Gcc_int
  • tst_QAtomicInteger_Gcc_long
  • ...
130553
177}-
178-
179QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

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