![]()  | 
  
    Qt 6.x
    
   The Qt SDK 
   | 
 
#include <QtTest/qtestcase.h>#include <QtTest/private/qtestcase_p.h>#include <QtTest/qtestassert.h>#include <QtCore/qbytearray.h>#include <QtCore/qcoreapplication.h>#include <QtCore/qdebug.h>#include <QtCore/qdir.h>#include <QtCore/qdiriterator.h>#include <QtCore/qfile.h>#include <QtCore/qfileinfo.h>#include <QtCore/qfloat16.h>#include <QtCore/qlibraryinfo.h>#include <QtCore/qlist.h>#include <QtCore/qmetaobject.h>#include <QtCore/qobject.h>#include <QtCore/qstringlist.h>#include <QtCore/qtemporarydir.h>#include <QtCore/qthread.h>#include <QtCore/qvarlengtharray.h>#include <QtCore/private/qlocking_p.h>#include <QtCore/private/qtools_p.h>#include <QtCore/private/qwaitcondition_p.h>#include <QtCore/qtestsupport_core.h>#include <QtTest/private/qtestlog_p.h>#include <QtTest/private/qtesttable_p.h>#include <QtTest/qtestdata.h>#include <QtTest/private/qtestresult_p.h>#include <QtTest/private/qsignaldumper_p.h>#include <QtTest/private/qbenchmark_p.h>#include <QtTest/private/cycle_p.h>#include <QtTest/private/qtestblacklist_p.h>#include <algorithm>#include <array>#include <charconv>#include <chrono>#include <cmath>#include <limits>#include <memory>#include <mutex>#include <numeric>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <vector>
 Include dependency graph for qtestcase.cpp:Go to the source code of this file.
Classes | |
| class | QTest::TestMethods | 
| struct | QTest::QTestDataSetter | 
| class | QTest::WatchDog | 
Namespaces | |
| namespace | QTestPrivate | 
| namespace | QTest | 
| [15]  | |
| namespace | QTest::Internal | 
Macros | |
| #define | TO_STRING_IMPL(TYPE, FORMAT) | 
| #define | TO_STRING_FLOAT(TYPE, FORMAT) | 
Functions | |
| static bool | alreadyDebugging () | 
| static bool | hasSystemCrashReporter () | 
| static void | maybeDisableCoreDump () | 
| static void | prepareStackTrace () | 
| static void | printTestRunTime () | 
| static void | generateStackTrace () | 
| static bool | installCoverageTool (const char *appname, const char *testname) | 
| static bool | isValidSlot (const QMetaMethod &sl) | 
| static void | QTest::invokeMethod (QObject *obj, const char *methodName) | 
| int | QTest::defaultEventDelay () | 
| int Q_TESTLIB_EXPORT | QTest::defaultMouseDelay () | 
| int Q_TESTLIB_EXPORT | QTest::defaultKeyDelay () | 
| static bool | QTest::qPrintTestSlots (FILE *stream, const char *filter=nullptr, const char *preamble="") | 
| static void | QTest::qPrintDataTags (FILE *stream) | 
| static int | QTest::qToInt (const char *str) | 
| Q_TESTLIB_EXPORT void | QTest::qtest_qParseArgs (int argc, const char *const argv[], bool qml) | 
| Q_TESTLIB_EXPORT void | QTest::qtest_qParseArgs (int argc, char *argv[], bool qml) | 
| static QList< QBenchmarkResult > | QTest::qMedian (const QList< QList< QBenchmarkResult > > &container) | 
| static void | QTest::printUnknownDataTagError (QLatin1StringView name, QLatin1StringView tag, const QTestTable &lTable, const QTestTable &gTable) | 
| void * | QTest::fetchData (QTestData *data, const char *tagName, int typeId) | 
| char * | QTest::formatString (const char *prefix, const char *suffix, size_t numArguments,...) | 
| char * | QTest::toHexRepresentation (const char *ba, qsizetype length) | 
| Returns a pointer to a string that is the string ba represented as a space-separated sequence of hex characters.   | |
| char * | QTest::toPrettyCString (const char *p, qsizetype length) | 
| char * | QTest::toPrettyUnicode (QStringView string) | 
| bool | QTest::reportResult (bool success, qxp::function_ref< const char *()> lhs, qxp::function_ref< const char *()> rhs, const char *lhsExpr, const char *rhsExpr, ComparisonOperation op, const char *file, int line) | 
| static void | initEnvironment () | 
| template<typename T > | |
| static bool | floatingCompare (const T &actual, const T &expected) | 
| static void | massageExponent (char *text) | 
Variables | |
| static DebuggerProgram | debugger = None | 
| Q_TESTLIB_EXPORT Qt::MouseButtons | QTestPrivate::qtestMouseButtons = Qt::NoButton | 
| Q_TESTLIB_EXPORT int | QTest::lastMouseTimestamp = 0 | 
| static QObject * | QTest::currentTestObject = nullptr | 
| static QString | QTest::mainSourcePath | 
| static bool | QTest::inTestFunction = false | 
| static int | QTest::keyDelay = -1 | 
| static int | QTest::mouseDelay = -1 | 
| static int | QTest::eventDelay = -1 | 
| static bool | QTest::noCrashHandler = false | 
| Q_TESTLIB_EXPORT bool | QTest::printAvailableFunctions = false | 
| Q_TESTLIB_EXPORT QStringList | QTest::testFunctions | 
| Q_TESTLIB_EXPORT QStringList | QTest::testTags | 
Definition at line 3374 of file qtestcase.cpp.
      
  | 
  static | 
Definition at line 220 of file qtestcase.cpp.
References open(), and read().
Referenced by generateStackTrace(), and QTest::TestMethods::invokeTests().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
Definition at line 3170 of file qtestcase.cpp.
References expected, Q_FALLTHROUGH, qFpClassify(), qFuzzyCompare(), and qFuzzyIsNull().
Referenced by QTest::qCompare(), QTest::qCompare(), and QTest::qCompare().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
Definition at line 371 of file qtestcase.cpp.
References alreadyDebugging(), debugger, EINTR_LOOP, None, ret, and void.
 Here is the call graph for this function:
      
  | 
  static | 
Definition at line 269 of file qtestcase.cpp.
References QTestPrivate::macCrashReporterWillShowDialog().
Referenced by prepareStackTrace().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
Definition at line 2201 of file qtestcase.cpp.
References qputenv().
Referenced by QTest::qInit().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
Definition at line 417 of file qtestcase.cpp.
References Q_UNUSED, qEnvironmentVariableIsEmpty(), and qputenv().
 Here is the call graph for this function:
      
  | 
  static | 
Definition at line 438 of file qtestcase.cpp.
References QMetaMethod::access(), QMetaMethod::methodType(), QMetaMethod::name(), QMetaMethod::parameterCount(), QMetaMethod::Private, QMetaMethod::returnType(), and QMetaMethod::Slot.
Referenced by QTest::TestMethods::TestMethods(), QTest::qPrintDataTags(), QTest::qPrintTestSlots(), and QTest::qRun().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
Be consistent about leading 0 in exponent.
POSIX specifies that e (hence g when using it) uses at least two digits in the exponent, requiring a leading 0 on single-digit exponents; (at least) MinGW includes a leading zero also on an already-two-digit exponent, e.g. 9e-040, which differs from more usual platforms. So massage that away.
Definition at line 3355 of file qtestcase.cpp.
References text.
      
  | 
  static | 
Definition at line 278 of file qtestcase.cpp.
References ok, qEnvironmentVariableIntValue(), and qWarning.
Referenced by QTest::qInit().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
Definition at line 294 of file qtestcase.cpp.
References debugger, hasSystemCrashReporter(), None, ok, and qEnvironmentVariableIntValue().
Referenced by QTest::qRun().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  static | 
Definition at line 361 of file qtestcase.cpp.
References QTest::currentTestFunction(), QTestLog::msecsFunctionTime(), QTestLog::msecsTotalTime(), and qRound().
 Here is the call graph for this function:
      
  | 
  static | 
Definition at line 293 of file qtestcase.cpp.
Referenced by QV4DebuggerAgent::addBreakPoint(), QV4DebuggerAgent::addDebugger(), QV4DebuggerAgent::clearAllPauseRequests(), QV4DebuggerAgent::debuggerPaused(), QV4DebuggerAgent::enableBreakPoint(), QQmlNativeDebugServiceImpl::engineAboutToBeAdded(), QV4DebugServiceImpl::engineAboutToBeRemoved(), QQmlNativeDebugServiceImpl::engineAboutToBeRemoved(), QV4DebugServiceImpl::engineAdded(), QV4::Moth::VME::exec(), generateStackTrace(), QV4DebuggerAgent::handleDebuggerDeleted(), QQmlNativeDebugServiceImpl::messageReceived(), QV4DebuggerAgent::pause(), QV4DebuggerAgent::pauseAll(), QV4DebuggerAgent::pausedDebugger(), prepareStackTrace(), QV4DebuggerAgent::removeBreakPoint(), QV4DebuggerAgent::removeDebugger(), QV4DebuggerAgent::resumeAll(), QV4DebuggerAgent::setBreakOnThrow(), QV4DebugServiceImpl::stateAboutToBeChanged(), and QQmlNativeDebugServiceImpl::stateAboutToBeChanged().