qtestlog.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6 -
7 -
8static void saveCoverageTool(const char * appname, bool testfailed, bool installedTestCoverage) -
9{ -
10 -
11 if (!installedTestCoverage)
partially evaluated: !installedTestCoverage
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:396
0-396
12 return;
never executed: return;
0
13 -
14 -
15 __coveragescanner_install(appname); -
16 __coveragescanner_teststate(testfailed ? "FAILED" : "PASSED"); -
17 __coveragescanner_save(); -
18 __coveragescanner_testname(""); -
19 __coveragescanner_clear(); -
20 unsetenv("QT_TESTCOCOON_ACTIVE"); -
21 -
22 -
23 -
24 -
25 -
26}
executed: }
Execution Count:399
399
27 -
28 -
29 -
30 -
31 -
32 -
33typedef void (*QtMsgHandler)(QtMsgType, const char *); -
34__attribute__((visibility("default"))) QtMsgHandler qInstallMsgHandler(QtMsgHandler); -
35 -
36namespace QTest { -
37 -
38 int fails = 0; -
39 int passes = 0; -
40 int skips = 0; -
41 -
42 struct IgnoreResultList -
43 { -
44 inline IgnoreResultList(QtMsgType tp, const char *message) -
45 : type(tp), next(0) -
46 { msg = qstrdup(message); }
executed: }
Execution Count:469
469
47 inline ~IgnoreResultList() -
48 { delete [] msg; }
executed: }
Execution Count:469
469
49 -
50 static inline void clearList(IgnoreResultList *&list) -
51 { -
52 while (list) {
partially evaluated: list
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:67229
0-67229
53 IgnoreResultList *current = list; -
54 list = list->next; -
55 delete current; -
56 }
never executed: }
0
57 }
executed: }
Execution Count:67229
67229
58 -
59 QtMsgType type; -
60 char *msg; -
61 IgnoreResultList *next; -
62 }; -
63 -
64 static IgnoreResultList *ignoreResultList = 0; -
65 -
66 struct LoggerList -
67 { -
68 QAbstractTestLogger *logger; -
69 LoggerList *next; -
70 }; -
71 -
72 class TestLoggers -
73 { -
74 public: -
75 static void addLogger(QAbstractTestLogger *logger) -
76 { -
77 LoggerList *l = new LoggerList; -
78 l->logger = logger; -
79 l->next = loggers; -
80 loggers = l; -
81 }
executed: }
Execution Count:399
399
82 -
83 static void destroyLoggers() -
84 { -
85 while (loggers) {
evaluated: loggers
TRUEFALSE
yes
Evaluation Count:396
yes
Evaluation Count:396
396
86 LoggerList *l = loggers; -
87 loggers = loggers->next; -
88 delete l->logger; -
89 delete l; -
90 }
executed: }
Execution Count:396
396
91 }
executed: }
Execution Count:396
396
92 static void startLogging() -
93 { -
94 LoggerList *l = loggers; while (l) { QAbstractTestLogger *logger = l->logger; (void)logger;; logger->startLogging(); l = l->next; };
evaluated: l
TRUEFALSE
yes
Evaluation Count:399
yes
Evaluation Count:399
executed: }
Execution Count:399
399
95 }
executed: }
Execution Count:399
399
96 -
97 static void stopLogging() -
98 { -
99 LoggerList *l = loggers; while (l) { QAbstractTestLogger *logger = l->logger; (void)logger;; logger->stopLogging(); l = l->next; };
executed: }
Execution Count:396
evaluated: l
TRUEFALSE
yes
Evaluation Count:396
yes
Evaluation Count:396
396
100 }
executed: }
Execution Count:396
396
101 -
102 static void enterTestFunction(const char *function) -
103 { -
104 LoggerList *l = loggers; while (l) { QAbstractTestLogger *logger = l->logger; (void)logger;; logger->enterTestFunction(function); l = l->next; };
executed: }
Execution Count:7610
evaluated: l
TRUEFALSE
yes
Evaluation Count:7610
yes
Evaluation Count:7610
7610
105 }
executed: }
Execution Count:7610
7610
106 -
107 static void leaveTestFunction() -
108 { -
109 LoggerList *l = loggers; while (l) { QAbstractTestLogger *logger = l->logger; (void)logger;; logger->leaveTestFunction(); l = l->next; };
executed: }
Execution Count:7607
evaluated: l
TRUEFALSE
yes
Evaluation Count:7607
yes
Evaluation Count:7607
7607
110 }
executed: }
Execution Count:7607
7607
111 -
112 static void addIncident(QAbstractTestLogger::IncidentTypes type, const char *description, -
113 const char *file = 0, int line = 0) -
114 { -
115 LoggerList *l = loggers; while (l) { QAbstractTestLogger *logger = l->logger; (void)logger;; logger->addIncident(type, description, file, line); l = l->next; };
evaluated: l
TRUEFALSE
yes
Evaluation Count:67322
yes
Evaluation Count:67322
executed: }
Execution Count:67322
67322
116 }
executed: }
Execution Count:67322
67322
117 -
118 static void addBenchmarkResult(const QBenchmarkResult &result) -
119 { -
120 LoggerList *l = loggers; while (l) { QAbstractTestLogger *logger = l->logger; (void)logger;; logger->addBenchmarkResult(result); l = l->next; };
evaluated: l
TRUEFALSE
yes
Evaluation Count:8
yes
Evaluation Count:8
executed: }
Execution Count:8
8
121 }
executed: }
Execution Count:8
8
122 -
123 static void addMessage(QAbstractTestLogger::MessageTypes type, const char *message, -
124 const char *file = 0, int line = 0) -
125 { -
126 LoggerList *l = loggers; while (l) { QAbstractTestLogger *logger = l->logger; (void)logger;; logger->addMessage(type, message, file, line); l = l->next; };
evaluated: l
TRUEFALSE
yes
Evaluation Count:1849
yes
Evaluation Count:1849
executed: }
Execution Count:1849
1849
127 }
executed: }
Execution Count:1849
1849
128 -
129 static void outputString(const char *msg) -
130 { -
131 LoggerList *l = loggers; while (l) { QAbstractTestLogger *logger = l->logger; (void)logger;; logger->outputString(msg); l = l->next; };
never evaluated: l
never executed: }
0
132 }
never executed: }
0
133 -
134 static int loggerCount() -
135 { -
136 int count = 0; -
137 LoggerList *l = loggers; while (l) { QAbstractTestLogger *logger = l->logger; (void)logger;; ++count; l = l->next; };
evaluated: l
TRUEFALSE
yes
Evaluation Count:2003
yes
Evaluation Count:2402
executed: }
Execution Count:2003
2003-2402
138 return count;
executed: return count;
Execution Count:2402
2402
139 } -
140 -
141 private: -
142 static LoggerList *loggers; -
143 }; -
144 -
145 -
146 -
147 LoggerList *TestLoggers::loggers = 0; -
148 static bool loggerUsingStdout = false; -
149 -
150 static int verbosity = 0; -
151 static int maxWarnings = 2002; -
152 static bool installedTestCoverage = true; -
153 -
154 static QtMsgHandler oldMessageHandler; -
155 -
156 static bool handleIgnoredMessage(QtMsgType type, const char *msg) -
157 { -
158 IgnoreResultList *last = 0; -
159 IgnoreResultList *list = ignoreResultList; -
160 while (list) {
evaluated: list
TRUEFALSE
yes
Evaluation Count:503
yes
Evaluation Count:1526
503-1526
161 if (list->type == type && strcmp(msg, list->msg) == 0) {
partially evaluated: list->type == type
TRUEFALSE
yes
Evaluation Count:503
no
Evaluation Count:0
evaluated: strcmp(msg, list->msg) == 0
TRUEFALSE
yes
Evaluation Count:469
yes
Evaluation Count:34
0-503
162 -
163 if (last)
partially evaluated: last
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:469
0-469
164 last->next = list->next;
never executed: last->next = list->next;
0
165 else if (list->next)
evaluated: list->next
TRUEFALSE
yes
Evaluation Count:70
yes
Evaluation Count:399
70-399
166 ignoreResultList = list->next;
executed: ignoreResultList = list->next;
Execution Count:70
70
167 else -
168 ignoreResultList = 0;
executed: ignoreResultList = 0;
Execution Count:399
399
169 -
170 delete list; -
171 return true;
executed: return true;
Execution Count:469
469
172 } -
173 -
174 last = list; -
175 list = list->next; -
176 }
executed: }
Execution Count:34
34
177 return false;
executed: return false;
Execution Count:1526
1526
178 } -
179 -
180 -
181 -
182 -
183 -
184 -
185 -
186 static void messageHandler(QtMsgType type, const char *msg) -
187 { -
188 static QBasicAtomicInt counter = { (QTest::maxWarnings) }; -
189 -
190 if (!msg || QTest::TestLoggers::loggerCount() == 0) {
partially evaluated: !msg
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1995
partially evaluated: QTest::TestLoggers::loggerCount() == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1995
0-1995
191 -
192 qInstallMsgHandler(oldMessageHandler); -
193 do { if (!(msg)) qt_assert("msg","qtestlog.cpp",254); } while (0);
never evaluated: !(msg)
never evaluated: 0
never executed: qt_assert("msg","qtestlog.cpp",254);
never executed: }
0
194 do { if (!(QTest::TestLoggers::loggerCount() != 0)) qt_assert("QTest::TestLoggers::loggerCount() != 0","qtestlog.cpp",255); } while (0);
never evaluated: !(QTest::TestLoggers::loggerCount() != 0)
never evaluated: 0
never executed: qt_assert("QTest::TestLoggers::loggerCount() != 0","qtestlog.cpp",255);
never executed: }
0
195 }
never executed: }
0
196 -
197 if (handleIgnoredMessage(type, msg))
evaluated: handleIgnoredMessage(type, msg)
TRUEFALSE
yes
Evaluation Count:469
yes
Evaluation Count:1526
469-1526
198 -
199 return;
executed: return;
Execution Count:469
469
200 -
201 if (type != QtFatalMsg) {
evaluated: type != QtFatalMsg
TRUEFALSE
yes
Evaluation Count:1521
yes
Evaluation Count:5
5-1521
202 if (counter.load() <= 0)
partially evaluated: counter.load() <= 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1521
0-1521
203 return;
never executed: return;
0
204 -
205 if (!counter.deref()) {
partially evaluated: !counter.deref()
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:1521
0-1521
206 QTest::TestLoggers::addMessage(QAbstractTestLogger::QSystem, -
207 "Maximum amount of warnings exceeded. Use -maxwarnings to override."); -
208 return;
never executed: return;
0
209 } -
210 }
executed: }
Execution Count:1521
1521
211 -
212 switch (type) { -
213 case QtDebugMsg: -
214 QTest::TestLoggers::addMessage(QAbstractTestLogger::QDebug, msg); -
215 break;
executed: break;
Execution Count:1076
1076
216 case QtCriticalMsg: -
217 QTest::TestLoggers::addMessage(QAbstractTestLogger::QSystem, msg); -
218 break;
never executed: break;
0
219 case QtWarningMsg: -
220 QTest::TestLoggers::addMessage(QAbstractTestLogger::QWarning, msg); -
221 break;
executed: break;
Execution Count:445
445
222 case QtFatalMsg: -
223 QTest::TestLoggers::addMessage(QAbstractTestLogger::QFatal, msg); -
224 -
225 -
226 -
227 -
228 -
229 QTestResult::addFailure("Received a fatal error.", "Unknown file", 0); -
230 QTestLog::leaveTestFunction(); -
231 QTestLog::stopLogging(); -
232 break;
executed: break;
Execution Count:5
5
233 } -
234 }
executed: }
Execution Count:1526
1526
235 -
236 -
237 -
238 -
239} -
240 -
241void QTestLog::enterTestFunction(const char* function) -
242{ -
243 if (printAvailableTags)
partially evaluated: printAvailableTags
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:7610
0-7610
244 return;
never executed: return;
0
245 -
246 do { if (!(function)) qt_assert("function","qtestlog.cpp",307); } while (0);
partially evaluated: !(function)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:7610
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:7610
never executed: qt_assert("function","qtestlog.cpp",307);
executed: }
Execution Count:7610
0-7610
247 -
248 QTest::TestLoggers::enterTestFunction(function); -
249}
executed: }
Execution Count:7610
7610
250 -
251int QTestLog::unhandledIgnoreMessages() -
252{ -
253 int i = 0; -
254 QTest::IgnoreResultList *list = QTest::ignoreResultList; -
255 while (list) {
partially evaluated: list
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:66997
0-66997
256 ++i; -
257 list = list->next; -
258 }
never executed: }
0
259 return i;
executed: return i;
Execution Count:66997
66997
260} -
261 -
262void QTestLog::leaveTestFunction() -
263{ -
264 if (printAvailableTags)
partially evaluated: printAvailableTags
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:7607
0-7607
265 return;
never executed: return;
0
266 -
267 QTest::TestLoggers::leaveTestFunction(); -
268}
executed: }
Execution Count:7607
7607
269 -
270void QTestLog::printUnhandledIgnoreMessages() -
271{ -
272 char msg[1024]; -
273 QTest::IgnoreResultList *list = QTest::ignoreResultList; -
274 while (list) {
never evaluated: list
0
275 qsnprintf(msg, 1024, "Did not receive message: \"%s\"", list->msg); -
276 QTest::TestLoggers::addMessage(QAbstractTestLogger::Info, msg); -
277 -
278 list = list->next; -
279 }
never executed: }
0
280}
never executed: }
0
281 -
282void QTestLog::clearIgnoreMessages() -
283{ -
284 QTest::IgnoreResultList::clearList(QTest::ignoreResultList); -
285}
executed: }
Execution Count:67229
67229
286 -
287void QTestLog::addPass(const char *msg) -
288{ -
289 if (printAvailableTags)
partially evaluated: printAvailableTags
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:66746
0-66746
290 return;
never executed: return;
0
291 -
292 do { if (!(msg)) qt_assert("msg","qtestlog.cpp",353); } while (0);
partially evaluated: !(msg)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:66746
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:66746
never executed: qt_assert("msg","qtestlog.cpp",353);
executed: }
Execution Count:66746
0-66746
293 -
294 ++QTest::passes; -
295 -
296 QTest::TestLoggers::addIncident(QAbstractTestLogger::Pass, msg); -
297}
executed: }
Execution Count:66746
66746
298 -
299void QTestLog::addFail(const char *msg, const char *file, int line) -
300{ -
301 do { if (!(msg)) qt_assert("msg","qtestlog.cpp",362); } while (0);
partially evaluated: !(msg)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:237
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:237
never executed: qt_assert("msg","qtestlog.cpp",362);
executed: }
Execution Count:237
0-237
302 -
303 ++QTest::fails; -
304 -
305 QTest::TestLoggers::addIncident(QAbstractTestLogger::Fail, msg, file, line); -
306}
executed: }
Execution Count:237
237
307 -
308void QTestLog::addXFail(const char *msg, const char *file, int line) -
309{ -
310 do { if (!(msg)) qt_assert("msg","qtestlog.cpp",371); } while (0);
partially evaluated: !(msg)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:339
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:339
never executed: qt_assert("msg","qtestlog.cpp",371);
executed: }
Execution Count:339
0-339
311 do { if (!(file)) qt_assert("file","qtestlog.cpp",372); } while (0);
partially evaluated: !(file)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:339
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:339
never executed: qt_assert("file","qtestlog.cpp",372);
executed: }
Execution Count:339
0-339
312 -
313 QTest::TestLoggers::addIncident(QAbstractTestLogger::XFail, msg, file, line); -
314}
executed: }
Execution Count:339
339
315 -
316void QTestLog::addXPass(const char *msg, const char *file, int line) -
317{ -
318 do { if (!(msg)) qt_assert("msg","qtestlog.cpp",379); } while (0);
never evaluated: !(msg)
never evaluated: 0
never executed: qt_assert("msg","qtestlog.cpp",379);
never executed: }
0
319 do { if (!(file)) qt_assert("file","qtestlog.cpp",380); } while (0);
never evaluated: !(file)
never evaluated: 0
never executed: qt_assert("file","qtestlog.cpp",380);
never executed: }
0
320 -
321 ++QTest::fails; -
322 -
323 QTest::TestLoggers::addIncident(QAbstractTestLogger::XPass, msg, file, line); -
324}
never executed: }
0
325 -
326void QTestLog::addSkip(const char *msg, const char *file, int line) -
327{ -
328 do { if (!(msg)) qt_assert("msg","qtestlog.cpp",389); } while (0);
partially evaluated: !(msg)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:315
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:315
never executed: qt_assert("msg","qtestlog.cpp",389);
executed: }
Execution Count:315
0-315
329 do { if (!(file)) qt_assert("file","qtestlog.cpp",390); } while (0);
partially evaluated: !(file)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:315
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:315
never executed: qt_assert("file","qtestlog.cpp",390);
executed: }
Execution Count:315
0-315
330 -
331 ++QTest::skips; -
332 -
333 QTest::TestLoggers::addMessage(QAbstractTestLogger::Skip, msg, file, line); -
334}
executed: }
Execution Count:315
315
335 -
336void QTestLog::addBenchmarkResult(const QBenchmarkResult &result) -
337{ -
338 QTest::TestLoggers::addBenchmarkResult(result); -
339}
executed: }
Execution Count:8
8
340 -
341void QTestLog::startLogging() -
342{ -
343 QTest::TestLoggers::startLogging(); -
344 QTest::oldMessageHandler = qInstallMsgHandler(QTest::messageHandler); -
345}
executed: }
Execution Count:399
399
346 -
347void QTestLog::stopLogging() -
348{ -
349 qInstallMsgHandler(QTest::oldMessageHandler); -
350 QTest::TestLoggers::stopLogging(); -
351 QTest::TestLoggers::destroyLoggers(); -
352 QTest::loggerUsingStdout = false; -
353 saveCoverageTool(QTestResult::currentAppname(), failCount() != 0, QTestLog::installedTestCoverage()); -
354}
executed: }
Execution Count:399
399
355 -
356void QTestLog::addLogger(LogMode mode, const char *filename) -
357{ -
358 if (filename && strcmp(filename, "-") == 0)
partially evaluated: filename
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:399
never evaluated: strcmp(filename, "-") == 0
0-399
359 filename = 0;
never executed: filename = 0;
0
360 if (!filename)
partially evaluated: !filename
TRUEFALSE
yes
Evaluation Count:399
no
Evaluation Count:0
0-399
361 QTest::loggerUsingStdout = true;
executed: QTest::loggerUsingStdout = true;
Execution Count:399
399
362 -
363 QAbstractTestLogger *logger = 0; -
364 switch (mode) { -
365 case QTestLog::Plain: -
366 logger = new QPlainTestLogger(filename); -
367 break;
executed: break;
Execution Count:399
399
368 case QTestLog::XML: -
369 logger = new QXmlTestLogger(QXmlTestLogger::Complete, filename); -
370 break;
never executed: break;
0
371 case QTestLog::LightXML: -
372 logger = new QXmlTestLogger(QXmlTestLogger::Light, filename); -
373 break;
never executed: break;
0
374 case QTestLog::XunitXML: -
375 logger = new QXunitTestLogger(filename); -
376 break;
never executed: break;
0
377 } -
378 do { if (!(logger)) qt_assert("logger","qtestlog.cpp",439); } while (0);
partially evaluated: !(logger)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:399
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:399
never executed: qt_assert("logger","qtestlog.cpp",439);
executed: }
Execution Count:399
0-399
379 QTest::TestLoggers::addLogger(logger); -
380}
executed: }
Execution Count:399
399
381 -
382int QTestLog::loggerCount() -
383{ -
384 return QTest::TestLoggers::loggerCount();
executed: return QTest::TestLoggers::loggerCount();
Execution Count:399
399
385} -
386 -
387bool QTestLog::loggerUsingStdout() -
388{ -
389 return QTest::loggerUsingStdout;
never executed: return QTest::loggerUsingStdout;
0
390} -
391 -
392void QTestLog::warn(const char *msg, const char *file, int line) -
393{ -
394 do { if (!(msg)) qt_assert("msg","qtestlog.cpp",455); } while (0);
partially evaluated: !(msg)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:8
never executed: qt_assert("msg","qtestlog.cpp",455);
executed: }
Execution Count:8
0-8
395 -
396 if (QTest::TestLoggers::loggerCount() > 0)
partially evaluated: QTest::TestLoggers::loggerCount() > 0
TRUEFALSE
yes
Evaluation Count:8
no
Evaluation Count:0
0-8
397 QTest::TestLoggers::addMessage(QAbstractTestLogger::Warn, msg, file, line);
executed: QTest::TestLoggers::addMessage(QAbstractTestLogger::Warn, msg, file, line);
Execution Count:8
8
398}
executed: }
Execution Count:8
8
399 -
400void QTestLog::info(const char *msg, const char *file, int line) -
401{ -
402 do { if (!(msg)) qt_assert("msg","qtestlog.cpp",463); } while (0);
never evaluated: !(msg)
never evaluated: 0
never executed: qt_assert("msg","qtestlog.cpp",463);
never executed: }
0
403 -
404 QTest::TestLoggers::addMessage(QAbstractTestLogger::Info, msg, file, line); -
405}
never executed: }
0
406 -
407void QTestLog::setVerboseLevel(int level) -
408{ -
409 QTest::verbosity = level; -
410}
never executed: }
0
411 -
412int QTestLog::verboseLevel() -
413{ -
414 return QTest::verbosity;
executed: return QTest::verbosity;
Execution Count:37002063
37002063
415} -
416 -
417void QTestLog::ignoreMessage(QtMsgType type, const char *msg) -
418{ -
419 do { if (!(msg)) qt_assert("msg","qtestlog.cpp",480); } while (0);
never executed: qt_assert("msg","qtestlog.cpp",480);
executed: }
Execution Count:469
partially evaluated: !(msg)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:469
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:469
0-469
420 -
421 QTest::IgnoreResultList *item = new QTest::IgnoreResultList(type, msg); -
422 -
423 QTest::IgnoreResultList *list = QTest::ignoreResultList; -
424 if (!list) {
evaluated: !list
TRUEFALSE
yes
Evaluation Count:399
yes
Evaluation Count:70
70-399
425 QTest::ignoreResultList = item; -
426 return;
executed: return;
Execution Count:399
399
427 } -
428 while (list->next)
evaluated: list->next
TRUEFALSE
yes
Evaluation Count:157
yes
Evaluation Count:70
70-157
429 list = list->next;
executed: list = list->next;
Execution Count:157
157
430 list->next = item; -
431}
executed: }
Execution Count:70
70
432 -
433void QTestLog::setMaxWarnings(int m) -
434{ -
435 QTest::maxWarnings = m <= 0 ? 2147483647 : m + 2;
never evaluated: m <= 0
0
436}
never executed: }
0
437 -
438bool QTestLog::printAvailableTags = false; -
439 -
440void QTestLog::setPrintAvailableTagsMode() -
441{ -
442 printAvailableTags = true; -
443}
never executed: }
0
444 -
445int QTestLog::passCount() -
446{ -
447 return QTest::passes;
executed: return QTest::passes;
Execution Count:396
396
448} -
449 -
450int QTestLog::failCount() -
451{ -
452 return QTest::fails;
executed: return QTest::fails;
Execution Count:1186
1186
453} -
454 -
455int QTestLog::skipCount() -
456{ -
457 return QTest::skips;
executed: return QTest::skips;
Execution Count:396
396
458} -
459 -
460void QTestLog::resetCounters() -
461{ -
462 QTest::passes = 0; -
463 QTest::fails = 0; -
464 QTest::skips = 0; -
465}
never executed: }
0
466 -
467void QTestLog::setInstalledTestCoverage(bool installed) -
468{ -
469 QTest::installedTestCoverage = installed; -
470}
executed: }
Execution Count:399
399
471 -
472bool QTestLog::installedTestCoverage() -
473{ -
474 return QTest::installedTestCoverage;
executed: return QTest::installedTestCoverage;
Execution Count:396
396
475} -
476 -
477 -
478 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial