![]() |
Qt 6.x
The Qt SDK
|
#include <qtestlog_p.h>
Collaboration diagram for QTestLog:Public Types | |
| enum | LogMode { Plain = 0 , XML , LightXML , JUnitXML , CSV , TeamCity , TAP } |
Public Member Functions | |
| QTestLog ()=delete | |
| ~QTestLog ()=delete | |
| Q_ENUM (LogMode) | |
Static Public Member Functions | |
| static void | enterTestFunction (const char *function) |
| static void | leaveTestFunction () |
| static void | enterTestData (QTestData *data) |
| static void | addPass (const char *msg) |
| static void | addFail (const char *msg, const char *file, int line) |
| static void | addXFail (const char *msg, const char *file, int line) |
| static void | addXPass (const char *msg, const char *file, int line) |
| static void | addBPass (const char *msg) |
| static void | addBFail (const char *msg, const char *file, int line) |
| static void | addBXPass (const char *msg, const char *file, int line) |
| static void | addBXFail (const char *msg, const char *file, int line) |
| static void | addSkip (const char *msg, const char *file, int line) |
| static void | addBenchmarkResult (const QList< QBenchmarkResult > &result) |
| static void | addBenchmarkResults (const QList< QBenchmarkResult > &result) |
| static void | ignoreMessage (QtMsgType type, const char *msg) |
| static void | ignoreMessage (QtMsgType type, const QRegularExpression &expression) |
| static void | failOnWarning (const char *msg) |
| static void | failOnWarning (const QRegularExpression &expression) |
| static int | unhandledIgnoreMessages () |
| static void | printUnhandledIgnoreMessages () |
| static void | clearIgnoreMessages () |
| static void | clearFailOnWarnings () |
| static void | clearCurrentTestState () |
| static void | warn (const char *msg, const char *file, int line) |
| static void | info (const char *msg, const char *file, int line) |
| static void | startLogging () |
| static void | stopLogging () |
| static void | addLogger (LogMode mode, const char *filename) |
| static void | addLogger (QAbstractTestLogger *logger) |
| static bool | hasLoggers () |
| static bool | loggerUsingStdout () |
| static void | setVerboseLevel (int level) |
| static int | verboseLevel () |
| static void | setMaxWarnings (int max) |
| static void | setPrintAvailableTagsMode () |
| static int | passCount () |
| static int | failCount () |
| static int | skipCount () |
| static int | blacklistCount () |
| static int | totalCount () |
| static void | resetCounters () |
| static void | setInstalledTestCoverage (bool installed) |
| static bool | installedTestCoverage () |
| static qint64 | nsecsTotalTime () |
| static qreal | msecsTotalTime () |
| static qint64 | nsecsFunctionTime () |
| static qreal | msecsFunctionTime () |
Related Symbols | |
(Note that these are not member symbols.) | |
| failOnWarning | |
Definition at line 33 of file qtestlog_p.h.
| enum QTestLog::LogMode |
| Enumerator | |
|---|---|
| Plain | |
| XML | |
| LightXML | |
| JUnitXML | |
| CSV | |
| TeamCity | |
| TAP | |
Definition at line 41 of file qtestlog_p.h.
|
delete |
|
delete |
|
inlinestatic |
Definition at line 66 of file qtestlog_p.h.
|
static |
Definition at line 474 of file qtestlog.cpp.
References FOREACH_TEST_LOGGER, and results.
Referenced by QuickTestResult::needsMoreMeasurements().
Here is the caller graph for this function:
|
static |
Definition at line 407 of file qtestlog.cpp.
References QAbstractTestLogger::BlacklistedFail, QTest::blacklists, QTest::currentTestState, file, FOREACH_TEST_LOGGER, line, Q_ASSERT, QTEST_ASSERT, QTest::Skipped, QTest::Suppressed, and QTest::Unresolved.
Referenced by QTestResult::addFailure().
Here is the caller graph for this function:
|
static |
Definition at line 395 of file qtestlog.cpp.
References QAbstractTestLogger::BlacklistedPass, QTest::blacklists, QTest::currentTestState, FOREACH_TEST_LOGGER, Q_ASSERT, QTEST_ASSERT, QTest::Suppressed, and QTest::Unresolved.
Referenced by QTestResult::finishedCurrentTestDataCleanup().
Here is the caller graph for this function:
|
static |
Definition at line 443 of file qtestlog.cpp.
References QAbstractTestLogger::BlacklistedXFail, file, FOREACH_TEST_LOGGER, line, and QTEST_ASSERT.
Referenced by checkStatement().
Here is the caller graph for this function:
|
static |
Definition at line 425 of file qtestlog.cpp.
References QAbstractTestLogger::BlacklistedXPass, QTest::blacklists, QTest::currentTestState, file, FOREACH_TEST_LOGGER, line, Q_ASSERT, QTEST_ASSERT, QTest::Skipped, QTest::Suppressed, and QTest::Unresolved.
Referenced by checkStatement().
Here is the caller graph for this function:
|
static |
Definition at line 347 of file qtestlog.cpp.
References QTest::currentTestState, QAbstractTestLogger::Fail, QTest::Failed, QTest::fails, file, FOREACH_TEST_LOGGER, line, Q_ASSERT, QTEST_ASSERT, QTest::Skipped, and QTest::Unresolved.
Referenced by QTestResult::addFailure().
Here is the caller graph for this function:Definition at line 499 of file qtestlog.cpp.
References addLogger(), QXmlTestLogger::Complete, CSV, JUnitXML, QXmlTestLogger::Light, LightXML, Plain, QTEST_ASSERT, TAP, TeamCity, and XML.
Referenced by addLogger(), and QTest::qtest_qParseArgs().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Adds a new logger to the set of loggers that will be used to report incidents and messages during testing.
The function takes ownership of the logger.
Definition at line 551 of file qtestlog.cpp.
References QTEST_ASSERT.
|
static |
Definition at line 332 of file qtestlog.cpp.
References QTest::currentTestState, FOREACH_TEST_LOGGER, QAbstractTestLogger::Pass, QTest::Passed, QTest::passes, Q_ASSERT, QTEST_ASSERT, and QTest::Unresolved.
Referenced by QTestResult::finishedCurrentTestDataCleanup().
Here is the caller graph for this function:
|
static |
Definition at line 453 of file qtestlog.cpp.
References QTest::currentTestState, QTest::Failed, file, FOREACH_TEST_LOGGER, line, Q_ASSERT, QTEST_ASSERT, QAbstractTestLogger::Skip, QTest::Skipped, QTest::skips, QTest::Suppressed, and QTest::Unresolved.
Referenced by QTestResult::addSkip().
Here is the caller graph for this function:
|
static |
Definition at line 367 of file qtestlog.cpp.
References file, FOREACH_TEST_LOGGER, line, QTEST_ASSERT, and QAbstractTestLogger::XFail.
Referenced by checkStatement().
Here is the caller graph for this function:
|
static |
Definition at line 377 of file qtestlog.cpp.
References QTest::currentTestState, QTest::Failed, QTest::fails, file, FOREACH_TEST_LOGGER, line, Q_ASSERT, QTEST_ASSERT, QTest::Skipped, QTest::Unresolved, and QAbstractTestLogger::XPass.
Referenced by checkStatement().
Here is the caller graph for this function:
|
static |
Definition at line 657 of file qtestlog.cpp.
References QTest::blacklists.
Referenced by QPlainTestLogger::stopLogging(), and totalCount().
Here is the caller graph for this function:
|
static |
Definition at line 327 of file qtestlog.cpp.
References QTest::currentTestState, and QTest::Unresolved.
Referenced by QTestResult::finishedCurrentTestDataCleanup(), and QTestResult::finishedCurrentTestFunction().
Here is the caller graph for this function:
|
static |
Definition at line 322 of file qtestlog.cpp.
References QTest::failOnWarningList.
Referenced by QTestResult::finishedCurrentTestData().
Here is the caller graph for this function:
|
static |
Definition at line 315 of file qtestlog.cpp.
References QTest::IgnoreResultList::clearList(), QTest::ignoreResultList, and QTest::mutex.
Referenced by QTestResult::finishedCurrentTestData().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 265 of file qtestlog.cpp.
References FOREACH_TEST_LOGGER, and QTEST_ASSERT.
Referenced by QTestResult::setCurrentTestData().
Here is the caller graph for this function:
|
static |
Definition at line 253 of file qtestlog.cpp.
References elapsedFunctionTime, FOREACH_TEST_LOGGER, function, QTEST_ASSERT, and QElapsedTimer::restart().
Referenced by QTestResult::setCurrentTestFunction().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 647 of file qtestlog.cpp.
References QTest::fails.
Referenced by QuickTestResult::exitCode(), QuickTestResult::failCount(), QTest::qRun(), saveCoverageTool(), stopLogging(), QPlainTestLogger::stopLogging(), QTapTestLogger::stopLogging(), and totalCount().
Here is the caller graph for this function:
|
static |
Definition at line 616 of file qtestlog.cpp.
References QTest::failOnWarningList, and QString::fromUtf8().
Here is the call graph for this function:
|
static |
|
static |
Definition at line 557 of file qtestlog.cpp.
Referenced by QTest::messageHandler(), and QTest::qtest_qParseArgs().
Here is the caller graph for this function:Definition at line 598 of file qtestlog.cpp.
References QTest::IgnoreResultList::append(), QString::fromUtf8(), QTest::ignoreResultList, QTest::mutex, and QTEST_ASSERT.
Referenced by QTest::ignoreMessage(), and QuickTestResult::ignoreWarning().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Definition at line 580 of file qtestlog.cpp.
References file, FOREACH_TEST_LOGGER, QString::fromUtf8(), QAbstractTestLogger::Info, line, and QTEST_ASSERT.
Referenced by compareHelper(), compareHelper(), QTest::qFindTestData(), QTest::qPrintMessage(), QTestResult::reportResult(), and QTestResult::verify().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 679 of file qtestlog.cpp.
References QTest::installedTestCoverage.
Referenced by stopLogging().
Here is the caller graph for this function:
|
static |
Definition at line 285 of file qtestlog.cpp.
References FOREACH_TEST_LOGGER.
Referenced by QTestResult::finishedCurrentTestFunction(), and QTest::messageHandler().
Here is the caller graph for this function:
|
static |
Definition at line 562 of file qtestlog.cpp.
References FOREACH_TEST_LOGGER.
Referenced by QTest::qtest_qParseArgs().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 117 of file qtestlog_p.h.
References nsecsFunctionTime().
Referenced by QXmlTestLogger::leaveTestFunction(), and printTestRunTime().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 115 of file qtestlog_p.h.
References nsecsTotalTime().
Referenced by printTestRunTime(), QJUnitTestLogger::stopLogging(), QPlainTestLogger::stopLogging(), and QXmlTestLogger::stopLogging().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 689 of file qtestlog.cpp.
References elapsedFunctionTime, and QElapsedTimer::nsecsElapsed().
Referenced by msecsFunctionTime().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 684 of file qtestlog.cpp.
References elapsedTotalTime, and QElapsedTimer::nsecsElapsed().
Referenced by msecsTotalTime().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 642 of file qtestlog.cpp.
References QTest::passes.
Referenced by QuickTestResult::passCount(), saveCoverageTool(), QPlainTestLogger::stopLogging(), QTapTestLogger::stopLogging(), and totalCount().
Here is the caller graph for this function:
|
static |
Definition at line 294 of file qtestlog.cpp.
References FOREACH_TEST_LOGGER, QTest::ignoreResultList, QAbstractTestLogger::Info, list, and QTest::mutex.
Referenced by QTestResult::finishedCurrentTestData().
Here is the caller graph for this function:| QTestLog::Q_ENUM | ( | LogMode | ) |
|
static |
Definition at line 667 of file qtestlog.cpp.
References QTest::fails, QTest::passes, and QTest::skips.
Referenced by QTestResult::reset().
Here is the caller graph for this function:
|
static |
Definition at line 674 of file qtestlog.cpp.
References QTest::installedTestCoverage.
Referenced by QTest::qtest_qParseArgs().
Here is the caller graph for this function:
|
static |
Definition at line 630 of file qtestlog.cpp.
References QTest::maxWarnings.
Referenced by QTest::qtest_qParseArgs().
Here is the caller graph for this function:
|
static |
Definition at line 637 of file qtestlog.cpp.
Referenced by QTest::qPrintDataTags().
Here is the caller graph for this function:
|
static |
Definition at line 588 of file qtestlog.cpp.
References QTest::verbosity.
Referenced by QTest::qtest_qParseArgs().
Here is the caller graph for this function:
|
static |
Definition at line 652 of file qtestlog.cpp.
References QTest::skips.
Referenced by QuickTestResult::skipCount(), QJUnitTestLogger::stopLogging(), QPlainTestLogger::stopLogging(), and totalCount().
Here is the caller graph for this function:
|
static |
Definition at line 480 of file qtestlog.cpp.
References elapsedFunctionTime, elapsedTotalTime, FOREACH_TEST_LOGGER, QTest::messageHandler(), QTest::oldMessageHandler, qInstallMessageHandler(), and QElapsedTimer::start().
Referenced by QTest::qInit(), and QuickTestResult::startLogging().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 489 of file qtestlog.cpp.
References QTestResult::currentAppName(), failCount(), FOREACH_TEST_LOGGER, installedTestCoverage(), QTest::oldMessageHandler, qInstallMessageHandler(), and saveCoverageTool().
Referenced by QTest::messageHandler(), QTest::qCleanup(), QuickTestResult::setProgramName(), and QuickTestResult::stopLogging().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 662 of file qtestlog.cpp.
References blacklistCount(), failCount(), passCount(), and skipCount().
Referenced by QTapTestLogger::addIncident(), and QTapTestLogger::stopLogging().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 273 of file qtestlog.cpp.
References i, QTest::ignoreResultList, list, and QTest::mutex.
Referenced by QTestResult::finishedCurrentTestData().
Here is the caller graph for this function:
|
static |
Definition at line 593 of file qtestlog.cpp.
References QTest::verbosity.
Referenced by QPlainTestLogger::addBenchmarkResults(), QPlainTestLogger::addIncident(), QTeamCityLogger::addIncident(), QPlainTestLogger::addMessage(), QTeamCityLogger::addMessage(), compareHelper(), compareHelper(), QPlainTestLogger::enterTestFunction(), QTest::qFindTestData(), QTestResult::reportResult(), QPlainTestLogger::startLogging(), QPlainTestLogger::stopLogging(), and QTestResult::verify().
Here is the caller graph for this function:
|
static |
Definition at line 572 of file qtestlog.cpp.
References file, FOREACH_TEST_LOGGER, QString::fromUtf8(), line, QTEST_ASSERT, and QAbstractTestLogger::Warn.
Referenced by QTest::qFindTestData(), and QuickTestResult::warn().
Here is the call graph for this function:
Here is the caller graph for this function:
|
related |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Appends a test failure to the test log if the message is output.
Referenced by QTest::failOnWarning().
Here is the caller graph for this function: