![]() |
Qt 6.x
The Qt SDK
|
[15] More...
Namespaces | |
namespace | Internal |
Classes | |
struct | IgnoreResultList |
class | QBenchmarkIterationController |
struct | QBenchmarkMetricKey |
struct | QTestDataSetter |
class | QTouchEventSequence |
class | QTouchEventWidgetSequence |
class | TestMethods |
class | TestRegistry |
class | WatchDog |
Functions | |
Q_CORE_EXPORT void | qSleep (int ms) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sleeps for ms milliseconds, blocking execution of the test. | |
Q_CORE_EXPORT void | qSleep (std::chrono::milliseconds msecs) |
template<typename Functor > | |
static bool | qWaitFor (Functor predicate, QDeadlineTimer deadline=QDeadlineTimer(std::chrono::seconds{5})) |
template<typename Functor > | |
static bool | qWaitFor (Functor predicate, int timeout) |
Q_CORE_EXPORT void | qWait (int ms) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Waits for msecs. | |
Q_CORE_EXPORT void | qWait (std::chrono::milliseconds msecs) |
Q_GUI_EXPORT bool | qWaitForWindowActive (QWindow *window, int timeout=5000) |
Q_GUI_EXPORT bool | qWaitForWindowExposed (QWindow *window, int timeout=5000) |
Q_GUI_EXPORT QPointingDevice * | createTouchDevice (QInputDevice::DeviceType devType=QInputDevice::DeviceType::TouchScreen, QInputDevice::Capabilities caps=QInputDevice::Capability::Position) |
template<> | |
char * | toString (const MyPoint &point) |
int | qt_asprintf (QTestCharBuffer *str, const char *format,...) |
void Q_TESTLIB_EXPORT | setBenchmarkResult (qreal result, QBenchmarkMetric metric) |
Sets the benchmark result for this test function to result. | |
int | iterationCount () |
void | setIterationCountHint (int count) |
void | setIterationCount (int count) |
void | beginBenchmarkMeasurement () |
QList< QBenchmarkMeasurerBase::Measurement > | endBenchmarkMeasurement () |
const char * | benchmarkMetricName (QBenchmarkMetric metric) |
const char * | benchmarkMetricUnit (QBenchmarkMetric metric) |
static const char * | ptIncidentType2String (QAbstractTestLogger::IncidentTypes type) |
static const char * | benchmarkResult2String () |
static const char * | ptMessageType2String (QAbstractTestLogger::MessageTypes type) |
template<typename T > | |
static int | countSignificantDigits (T num) |
template<typename T > | |
QByteArray | formatResult (T number, int significantDigits) |
static void | qPrintMessage (const QByteArray &ba) |
static void | qSignalDumperCallback (QObject *caller, int signal_index, void **argv) |
static void | qSignalDumperCallbackSlot (QObject *caller, int method_index, void **argv) |
static void | qSignalDumperCallbackEndSignal (QObject *caller, int) |
static const char * | tcIncidentType2String (QAbstractTestLogger::IncidentTypes type) |
static const char * | tcMessageType2String (QAbstractTestLogger::MessageTypes type) |
template<> | |
char * | toString (const QStringView &str) |
template<> | |
char * | toString (const QString &str) |
template<> | |
char * | toString (const QLatin1StringView &str) |
template<> | |
char * | toString (const QByteArray &ba) |
template<> | |
char * | toString (const QBitArray &ba) |
template<> | |
char * | toString (const QCborError &c) |
template<> | |
char * | toString (const QChar &c) |
template<> | |
char * | toString (const QPoint &p) |
template<> | |
char * | toString (const QSize &s) |
template<> | |
char * | toString (const QRect &s) |
template<> | |
char * | toString (const QPointF &p) |
template<> | |
char * | toString (const QSizeF &s) |
template<> | |
char * | toString (const QRectF &s) |
template<> | |
char * | toString (const QUrl &uri) |
template<> | |
char * | toString (const QUuid &uuid) |
template<> | |
char * | toString (const QVariant &v) |
template<> | |
char * | toString (const QPartialOrdering &o) |
template<> | |
char * | toString (const QCborValue &v) |
template<> | |
char * | toString (const QCborValueRef &v) |
template<> | |
char * | toString (const QCborArray &a) |
template<> | |
char * | toString (const QCborMap &m) |
template<typename Rep , typename Period > | |
char * | toString (std::chrono::duration< Rep, Period > dur) |
template<typename T1 , typename T2 > | |
char * | toString (const std::pair< T1, T2 > &pair) |
template<typename Tuple , int... I> | |
char * | toString (const Tuple &tuple, QtPrivate::IndexesList< I... >) |
template<class... Types> | |
char * | toString (const std::tuple< Types... > &tuple) |
char * | toString (std::nullptr_t) |
template<> | |
bool | qCompare (QString const &t1, QLatin1StringView const &t2, const char *actual, const char *expected, const char *file, int line) |
template<> | |
bool | qCompare (QLatin1StringView const &t1, QString const &t2, const char *actual, const char *expected, const char *file, int line) |
template<typename ActualIterator , typename ExpectedIterator > | |
bool | _q_compareSequence (ActualIterator actualIt, ActualIterator actualEnd, ExpectedIterator expectedBegin, ExpectedIterator expectedEnd, const char *actual, const char *expected, const char *file, int line) |
template<typename T > | |
bool | qCompare (QList< T > const &t1, QList< T > const &t2, const char *actual, const char *expected, const char *file, int line) |
template<typename T , int N> | |
bool | qCompare (QList< T > const &t1, std::initializer_list< T > t2, const char *actual, const char *expected, const char *file, int line) |
template<typename T , int N> | |
bool | qCompare (QList< T > const &t1, const T(&t2)[N], const char *actual, const char *expected, const char *file, int line) |
template<typename T > | |
bool | qCompare (QFlags< T > const &t1, T const &t2, const char *actual, const char *expected, const char *file, int line) |
template<typename T > | |
bool | qCompare (QFlags< T > const &t1, int const &t2, const char *actual, const char *expected, const char *file, int line) |
template<> | |
bool | qCompare (qint64 const &t1, qint32 const &t2, const char *actual, const char *expected, const char *file, int line) |
template<> | |
bool | qCompare (qint64 const &t1, quint32 const &t2, const char *actual, const char *expected, const char *file, int line) |
template<> | |
bool | qCompare (quint64 const &t1, quint32 const &t2, const char *actual, const char *expected, const char *file, int line) |
template<> | |
bool | qCompare (qint32 const &t1, qint64 const &t2, const char *actual, const char *expected, const char *file, int line) |
template<> | |
bool | qCompare (quint32 const &t1, qint64 const &t2, const char *actual, const char *expected, const char *file, int line) |
template<> | |
bool | qCompare (quint32 const &t1, quint64 const &t2, const char *actual, const char *expected, const char *file, int line) |
template<> | |
char * | toString (const QColor &color) |
template<> | |
char * | toString (const QRegion ®ion) |
template<> | |
char * | toString (const QVector2D &v) |
template<> | |
char * | toString (const QVector3D &v) |
template<> | |
char * | toString (const QVector4D &v) |
bool | qCompare (QIcon const &t1, QIcon const &t2, const char *actual, const char *expected, const char *file, int line) |
bool | qCompare (QImage const &t1, QImage const &t2, const char *actual, const char *expected, const char *file, int line) |
bool | qCompare (QPixmap const &t1, QPixmap const &t2, const char *actual, const char *expected, const char *file, int line) |
template<> | |
char * | toString< QHostAddress > (const QHostAddress &addr) |
char * | toString (QNetworkReply::NetworkError code) |
char * | toString (const QNetworkCookie &cookie) |
char * | toString (const QList< QNetworkCookie > &list) |
char * | toString (QSizePolicy::Policy p) |
char * | toString (QSizePolicy::ControlTypes ct) |
char * | toString (QSizePolicy::ControlType ct) |
char * | toString (QSizePolicy sp) |
static void | invokeMethod (QObject *obj, const char *methodName) |
int | defaultEventDelay () |
int Q_TESTLIB_EXPORT | defaultMouseDelay () |
int Q_TESTLIB_EXPORT | defaultKeyDelay () |
static bool | qPrintTestSlots (FILE *stream, const char *filter=nullptr, const char *preamble="") |
static void | qPrintDataTags (FILE *stream) |
static int | qToInt (const char *str) |
Q_TESTLIB_EXPORT void | qtest_qParseArgs (int argc, const char *const argv[], bool qml) |
Q_TESTLIB_EXPORT void | qtest_qParseArgs (int argc, char *argv[], bool qml) |
static QList< QBenchmarkResult > | qMedian (const QList< QList< QBenchmarkResult > > &container) |
static void | printUnknownDataTagError (QLatin1StringView name, QLatin1StringView tag, const QTestTable &lTable, const QTestTable &gTable) |
void * | fetchData (QTestData *data, const char *tagName, int typeId) |
char * | formatString (const char *prefix, const char *suffix, size_t numArguments,...) |
char * | 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 * | toPrettyCString (const char *p, qsizetype length) |
char * | toPrettyUnicode (QStringView string) |
bool | 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) |
template<typename T > | |
char * | toString (const T &t) |
template<typename T1 , typename T2 > | |
char * | toString (const QPair< T1, T2 > &pair) |
Q_TESTLIB_EXPORT char * | toString (const char *) |
Q_TESTLIB_EXPORT char * | toString (const volatile void *) |
Q_TESTLIB_EXPORT char * | toString (const void *) |
Q_TESTLIB_EXPORT char * | toString (const volatile QObject *) |
Q_TESTLIB_EXPORT void | qInit (QObject *testObject, int argc=0, char **argv=nullptr) |
Q_TESTLIB_EXPORT int | qRun () |
Q_TESTLIB_EXPORT void | qCleanup () |
Q_TESTLIB_EXPORT int | qExec (QObject *testObject, int argc=0, char **argv=nullptr) |
Executes tests declared in testObject. | |
Q_TESTLIB_EXPORT int | qExec (QObject *testObject, const QStringList &arguments) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Q_TESTLIB_EXPORT void | setMainSourcePath (const char *file, const char *builddir=nullptr) |
Q_TESTLIB_EXPORT bool | qVerify (bool statement, const char *statementStr, const char *description, const char *file, int line) |
Q_DECL_COLD_FUNCTION Q_TESTLIB_EXPORT void | qFail (const char *message, const char *file, int line) |
Q_TESTLIB_EXPORT void | qSkip (const char *message, const char *file, int line) |
Q_TESTLIB_EXPORT bool | qExpectFail (const char *dataIndex, const char *comment, TestFailMode mode, const char *file, int line) |
Q_DECL_COLD_FUNCTION Q_TESTLIB_EXPORT void | qCaught (const char *expected, const char *what, const char *file, int line) |
Q_TESTLIB_EXPORT void | ignoreMessage (QtMsgType type, const char *message) |
Ignores messages created by qDebug(), qInfo() or qWarning(). | |
Q_TESTLIB_EXPORT void | failOnWarning (const char *message) |
Q_TESTLIB_EXPORT QString | qFindTestData (const char *basepath, const char *file=nullptr, int line=0, const char *builddir=nullptr, const char *sourcedir=nullptr) |
Q_TESTLIB_EXPORT QString | qFindTestData (const QString &basepath, const char *file=nullptr, int line=0, const char *builddir=nullptr, const char *sourcedir=nullptr) |
Q_TESTLIB_EXPORT void * | qData (const char *tagName, int typeId) |
Q_TESTLIB_EXPORT void * | qGlobalData (const char *tagName, int typeId) |
Q_TESTLIB_EXPORT void * | qElementData (const char *elementName, int metaTypeId) |
Q_TESTLIB_EXPORT QObject * | testObject () |
Q_TESTLIB_EXPORT const char * | currentAppName () |
Returns the name of the binary that is currently executed. | |
Q_TESTLIB_EXPORT const char * | currentTestFunction () |
Returns the name of the test function that is currently executed. | |
Q_TESTLIB_EXPORT const char * | currentDataTag () |
Returns the name of the current test data. | |
Q_TESTLIB_EXPORT bool | currentTestFailed () |
Returns true if the current test function has failed, otherwise false. | |
Q_TESTLIB_EXPORT bool | currentTestResolved () |
Q_TESTLIB_EXPORT bool | runningTest () |
Q_TESTLIB_EXPORT Qt::Key | asciiToKey (char ascii) |
Q_TESTLIB_EXPORT char | keyToAscii (Qt::Key key) |
Q_TESTLIB_EXPORT bool | compare_helper (bool success, const char *failureMsg, qxp::function_ref< const char *()> actualVal, qxp::function_ref< const char *()> expectedVal, const char *actual, const char *expected, const char *file, int line) |
Q_TESTLIB_EXPORT bool | compare_helper (bool success, const char *failureMsg, const char *actual, const char *expected, const char *file, int line) |
Q_TESTLIB_EXPORT void | addColumnInternal (int id, const char *name) |
template<typename T > | |
void | addColumn (const char *name, T *=nullptr) |
Adds a column with type {T} to the current test data. | |
Q_TESTLIB_EXPORT QTestData & | newRow (const char *dataTag) |
Appends a new row to the current test data. | |
Q_TESTLIB_EXPORT QTestData & | addRow (const char *format,...) Q_ATTRIBUTE_FORMAT_PRINTF(1 |
Q_TESTLIB_EXPORT QTestData Q_TESTLIB_EXPORT bool | qCompare (qfloat16 const &t1, qfloat16 const &t2, const char *actual, const char *expected, const char *file, int line) |
Q_TESTLIB_EXPORT bool | qCompare (float const &t1, float const &t2, const char *actual, const char *expected, const char *file, int line) |
Q_TESTLIB_EXPORT bool | qCompare (double const &t1, double const &t2, const char *actual, const char *expected, const char *file, int line) |
Q_TESTLIB_EXPORT bool | qCompare (int t1, int t2, const char *actual, const char *expected, const char *file, int line) |
Q_TESTLIB_EXPORT bool | qCompare (unsigned t1, unsigned t2, const char *actual, const char *expected, const char *file, int line) |
Q_TESTLIB_EXPORT bool | qCompare (QStringView t1, QStringView t2, const char *actual, const char *expected, const char *file, int line) |
Q_TESTLIB_EXPORT bool | qCompare (QStringView t1, const QLatin1StringView &t2, const char *actual, const char *expected, const char *file, int line) |
Q_TESTLIB_EXPORT bool | qCompare (const QLatin1StringView &t1, QStringView t2, const char *actual, const char *expected, const char *file, int line) |
bool | qCompare (const QString &t1, const QString &t2, const char *actual, const char *expected, const char *file, int line) |
bool | compare_ptr_helper (const volatile void *t1, const volatile void *t2, const char *actual, const char *expected, const char *file, int line) |
bool | compare_ptr_helper (const volatile QObject *t1, const volatile QObject *t2, const char *actual, const char *expected, const char *file, int line) |
bool | compare_ptr_helper (const volatile QObject *t1, std::nullptr_t, const char *actual, const char *expected, const char *file, int line) |
bool | compare_ptr_helper (std::nullptr_t, const volatile QObject *t2, const char *actual, const char *expected, const char *file, int line) |
bool | compare_ptr_helper (const volatile void *t1, std::nullptr_t, const char *actual, const char *expected, const char *file, int line) |
bool | compare_ptr_helper (std::nullptr_t, const volatile void *t2, const char *actual, const char *expected, const char *file, int line) |
Q_TESTLIB_EXPORT bool | compare_string_helper (const char *t1, const char *t2, const char *actual, const char *expected, const char *file, int line) |
template<typename T1 , typename T2 = T1> | |
bool | qCompare (const T1 &t1, const T2 &t2, const char *actual, const char *expected, const char *file, int line) |
bool | qCompare (double const &t1, float const &t2, const char *actual, const char *expected, const char *file, int line) |
bool | qCompare (float const &t1, double const &t2, const char *actual, const char *expected, const char *file, int line) |
template<typename T > | |
bool | qCompare (const T *t1, const T *t2, const char *actual, const char *expected, const char *file, int line) |
template<typename T > | |
bool | qCompare (T *t1, T *t2, const char *actual, const char *expected, const char *file, int line) |
template<typename T > | |
bool | qCompare (T *t1, std::nullptr_t, const char *actual, const char *expected, const char *file, int line) |
template<typename T > | |
bool | qCompare (std::nullptr_t, T *t2, const char *actual, const char *expected, const char *file, int line) |
template<typename T1 , typename T2 > | |
bool | qCompare (const T1 *t1, const T2 *t2, const char *actual, const char *expected, const char *file, int line) |
template<typename T1 , typename T2 > | |
bool | qCompare (T1 *t1, T2 *t2, const char *actual, const char *expected, const char *file, int line) |
bool | qCompare (const char *t1, const char *t2, const char *actual, const char *expected, const char *file, int line) |
bool | qCompare (char *t1, char *t2, const char *actual, const char *expected, const char *file, int line) |
bool | qCompare (char *t1, const char *t2, const char *actual, const char *expected, const char *file, int line) |
bool | qCompare (const char *t1, char *t2, const char *actual, const char *expected, const char *file, int line) |
template<class T > | |
bool | qTest (const T &actual, const char *elementName, const char *actualStr, const char *expected, const char *file, int line) |
static void | simulateEvent (QWindow *window, bool press, int code, Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay=-1) |
static void | sendKeyEvent (KeyAction action, QWindow *window, Qt::Key code, QString text, Qt::KeyboardModifiers modifier, int delay=-1) |
static void | sendKeyEvent (KeyAction action, QWindow *window, Qt::Key code, char ascii, Qt::KeyboardModifiers modifier, int delay=-1) |
static void | keyEvent (KeyAction action, QWindow *window, char ascii, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1) |
static void | keyEvent (KeyAction action, QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1) |
static void | keyClick (QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1) |
static void | keyClick (QWindow *window, char key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1) |
static void | keyRelease (QWindow *window, char key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1) |
static void | keyRelease (QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1) |
static void | keyPress (QWindow *window, char key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1) |
static void | keyPress (QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1) |
static bool | handleIgnoredMessage (QtMsgType type, const QString &message) |
static bool | handleFailOnWarning (const QMessageLogContext &context, const QString &message) |
static void | messageHandler (QtMsgType type, const QMessageLogContext &context, const QString &message) |
static void | mouseEvent (MouseAction action, QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos, int delay=-1) |
void | mousePress (QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey=Qt::KeyboardModifiers(), QPoint pos=QPoint(), int delay=-1) |
void | mouseRelease (QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey=Qt::KeyboardModifiers(), QPoint pos=QPoint(), int delay=-1) |
void | mouseClick (QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey=Qt::KeyboardModifiers(), QPoint pos=QPoint(), int delay=-1) |
void | mouseDClick (QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey=Qt::KeyboardModifiers(), QPoint pos=QPoint(), int delay=-1) |
void | mouseMove (QWindow *window, QPoint pos=QPoint(), int delay=-1) |
Q_GLOBAL_STATIC (TestRegistry, g_registry) | |
static void | setFailed (bool failed) |
static void | resetFailed () |
static bool | hasFailed () |
QTouchEventSequence | touchEvent (QWindow *window, QPointingDevice *device, bool autoCommit=true) |
static const char * | xmlMessageType2String (QAbstractTestLogger::MessageTypes type) |
static const char * | xmlIncidentType2String (QAbstractTestLogger::IncidentTypes type) |
static bool | isEmpty (const char *str) |
static const char * | incidentFormatString (bool noDescription, bool noTag) |
static const char * | benchmarkResultFormatString () |
static const char * | messageFormatString (bool noDescription, bool noTag) |
Q_WIDGETS_EXPORT bool | qWaitForWindowActive (QWidget *widget, int timeout=5000) |
Q_WIDGETS_EXPORT bool | qWaitForWindowExposed (QWidget *widget, int timeout=5000) |
char * | toString (const QGeoAreaMonitorInfo &info) |
char * | toString (const QGeoPositionInfo &info) |
char * | toString (const QGeoSatelliteInfo &info) |
[15]
[16]
anonymous enum |
Enumerator | |
---|---|
IndentSpacesCount |
Definition at line 29 of file qsignaldumper.cpp.
anonymous enum |
Enumerator | |
---|---|
Unresolved | |
Passed | |
Skipped | |
Suppressed | |
Failed |
Definition at line 81 of file qtestlog.cpp.
Enumerator | |
---|---|
AI_Undefined | |
AI_Name | |
AI_Tests | |
AI_Failures | |
AI_Errors | |
AI_Type | |
AI_Message | |
AI_PropertyValue | |
AI_Value | |
AI_Time | |
AI_Timestamp | |
AI_Hostname | |
AI_Classname | |
AI_Skipped |
Definition at line 26 of file qtestelementattribute_p.h.
|
strong |
Enumerator | |
---|---|
CustomCompare | |
Equal | |
NotEqual | |
LessThan | |
LessThanOrEqual | |
GreaterThan | |
GreaterThanOrEqual |
Definition at line 30 of file qttestglobal.h.
enum QTest::KeyAction |
Enumerator | |
---|---|
Press | |
Release | |
Click | |
Shortcut |
Definition at line 37 of file qtestkeyboard.h.
Enumerator | |
---|---|
LET_Undefined | |
LET_Property | |
LET_Properties | |
LET_Failure | |
LET_Error | |
LET_TestCase | |
LET_TestSuite | |
LET_Text | |
LET_SystemError | |
LET_SystemOutput | |
LET_Skipped |
Definition at line 44 of file qtestelementattribute_p.h.
enum QTest::MouseAction |
Enumerator | |
---|---|
MousePress | |
MouseRelease | |
MouseClick | |
MouseDClick | |
MouseMove |
Definition at line 42 of file qtestmouse.h.
This enum lists all the things that can be benchmarked.
\value FramesPerSecond Frames per second \value BitsPerSecond Bits per second \value BytesPerSecond Bytes per second \value WalltimeMilliseconds Clock time in milliseconds \value WalltimeNanoseconds Clock time in nanoseconds \value BytesAllocated Memory usage in bytes \value Events Event count \value CPUTicks CPU time \value CPUMigrations Process migrations between CPUs \value CPUCycles CPU cycles \value RefCPUCycles Reference CPU cycles \value BusCycles Bus cycles \value StalledCycles Cycles stalled \value InstructionReads Instruction reads \value Instructions Instructions executed \value BranchInstructions Branch-type instructions \value BranchMisses Branch instructions that were mispredicted \value CacheReferences Cache accesses of any type \value CacheMisses Cache misses of any type \value CacheReads Cache reads / loads \value CacheReadMisses Cache read / load misses \value CacheWrites Cache writes / stores \value CacheWriteMisses Cache write / store misses \value CachePrefetches Cache prefetches \value CachePrefetchMisses Cache prefetch misses \value ContextSwitches Context switches \value PageFaults Page faults of any type \value MinorPageFaults Minor page faults \value MajorPageFaults Major page faults \value AlignmentFaults Faults caused due to misalignment \value EmulationFaults Faults that needed software emulation
Note that WalltimeNanoseconds
and BytesAllocated
are only provided for use via \l setBenchmarkResult(), and results in those metrics are not able to be provided automatically by the QTest framework.
Definition at line 15 of file qbenchmarkmetric.h.
enum QTest::TestFailMode |
Enumerator | |
---|---|
Abort | |
Continue |
Definition at line 29 of file qttestglobal.h.
bool QTest::_q_compareSequence | ( | ActualIterator | actualIt, |
ActualIterator | actualEnd, | ||
ExpectedIterator | expectedBegin, | ||
ExpectedIterator | expectedEnd, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 419 of file qtest.h.
References compare_helper(), expected, file, i, line, qsnprintf(), and toString().
Referenced by qCompare(), qCompare(), and qCompare().
|
inline |
Adds a column with type {T} to the current test data.
name is the name of the column. dummy is a workaround for buggy compilers and can be ignored.
To populate the column with values, newRow() can be used. Use \l QFETCH() to fetch the data in the actual test.
Example:
To add custom types to the testdata, the type must be registered with QMetaType via \l Q_DECLARE_METATYPE().
See \l {Chapter 2: Data Driven Testing}{Data Driven Testing} for a more extensive example.
Definition at line 456 of file qtestcase.h.
References addColumnInternal().
void QTest::addColumnInternal | ( | int | id, |
const char * | name | ||
) |
Definition at line 2900 of file qtestcase.cpp.
References QTestTable::addColumn(), QTestTable::currentTestTable(), and QTEST_ASSERT_X.
Referenced by addColumn().
QTestData & QTest::addRow | ( | const char * | format, |
... | |||
) |
Appends a new row to the current test data.
The function's arguments are passed to qsnprintf() for formatting according to format. See the qvsnprintf() documentation for caveats and limitations.
The test output will identify the test run with this test data using the name that results from this formatting.
Returns a QTestData reference that can be used to stream in data, one value for each column in the table.
Example:
See \l {Chapter 2: Data Driven Testing}{Data Driven Testing} for a more extensive example.
Definition at line 2965 of file qtestcase.cpp.
References QTestTable::currentTestTable(), QTestTable::elementCount(), QTestTable::newData(), QTEST_ASSERT_X, qvsnprintf(), and void.
Referenced by MyTestClass::addMultStringRows(), and for().
QT_BEGIN_NAMESPACE Qt::Key QTest::asciiToKey | ( | char | ascii | ) |
Convert an ascii char key value to a Qt Key value. If the key is unknown a 0 is returned.
Note: this may happen more than you like since not all known ascii keys are converted already. So feel free to add all the keys you need.
Definition at line 16 of file qasciikey.cpp.
References Qt::Key_0, Qt::Key_1, Qt::Key_2, Qt::Key_3, Qt::Key_4, Qt::Key_5, Qt::Key_6, Qt::Key_7, Qt::Key_8, Qt::Key_9, Qt::Key_A, Qt::Key_Aacute, Qt::Key_Acircumflex, Qt::Key_acute, Qt::Key_Adiaeresis, Qt::Key_AE, Qt::Key_Agrave, Qt::Key_Ampersand, Qt::Key_Apostrophe, Qt::Key_Aring, Qt::Key_AsciiCircum, Qt::Key_AsciiTilde, Qt::Key_Asterisk, Qt::Key_At, Qt::Key_Atilde, Qt::Key_B, Qt::Key_Backslash, Qt::Key_Backspace, Qt::Key_Backtab, Qt::Key_Bar, Qt::Key_BraceLeft, Qt::Key_BraceRight, Qt::Key_BracketLeft, Qt::Key_BracketRight, Qt::Key_brokenbar, Qt::Key_C, Qt::Key_Ccedilla, Qt::Key_cedilla, Qt::Key_cent, Qt::Key_Colon, Qt::Key_Comma, Qt::Key_copyright, Qt::Key_currency, Qt::Key_D, Qt::Key_degree, Qt::Key_diaeresis, Qt::Key_division, Qt::Key_Dollar, Qt::Key_Down, Qt::Key_E, Qt::Key_Eacute, Qt::Key_Ecircumflex, Qt::Key_Ediaeresis, Qt::Key_Egrave, Qt::Key_Equal, Qt::Key_Escape, Qt::Key_ETH, Qt::Key_Exclam, Qt::Key_exclamdown, Qt::Key_F, Qt::Key_G, Qt::Key_Greater, Qt::Key_guillemotleft, Qt::Key_guillemotright, Qt::Key_H, Qt::Key_hyphen, Qt::Key_I, Qt::Key_Iacute, Qt::Key_Icircumflex, Qt::Key_Idiaeresis, Qt::Key_Igrave, Qt::Key_J, Qt::Key_K, Qt::Key_L, Qt::Key_Less, Qt::Key_M, Qt::Key_macron, Qt::Key_masculine, Qt::Key_Minus, Qt::Key_mu, Qt::Key_multiply, Qt::Key_N, Qt::Key_nobreakspace, Qt::Key_notsign, Qt::Key_Ntilde, Qt::Key_NumberSign, Qt::Key_O, Qt::Key_Oacute, Qt::Key_Ocircumflex, Qt::Key_Odiaeresis, Qt::Key_Ograve, Qt::Key_onehalf, Qt::Key_onequarter, Qt::Key_onesuperior, Qt::Key_Ooblique, Qt::Key_ordfeminine, Qt::Key_Otilde, Qt::Key_P, Qt::Key_paragraph, Qt::Key_ParenLeft, Qt::Key_ParenRight, Qt::Key_Percent, Qt::Key_Period, Qt::Key_periodcentered, Qt::Key_Plus, Qt::Key_plusminus, Qt::Key_Q, Qt::Key_Question, Qt::Key_questiondown, Qt::Key_QuoteDbl, Qt::Key_QuoteLeft, Qt::Key_R, Qt::Key_registered, Qt::Key_Return, Qt::Key_S, Qt::Key_section, Qt::Key_Semicolon, Qt::Key_Slash, Qt::Key_Space, Qt::Key_ssharp, Qt::Key_sterling, Qt::Key_T, Qt::Key_Tab, Qt::Key_THORN, Qt::Key_threequarters, Qt::Key_threesuperior, Qt::Key_twosuperior, Qt::Key_U, Qt::Key_Uacute, Qt::Key_Ucircumflex, Qt::Key_Udiaeresis, Qt::Key_Ugrave, Qt::Key_Underscore, Qt::Key_Up, Qt::Key_V, Qt::Key_W, Qt::Key_X, Qt::Key_Y, Qt::Key_Yacute, Qt::Key_ydiaeresis, Qt::Key_yen, Qt::Key_Z, and QTEST_ASSERT.
Referenced by keyEvent().
void QTest::beginBenchmarkMeasurement | ( | ) |
Definition at line 208 of file qbenchmark.cpp.
References QBenchmarkGlobalData::current, QBenchmarkGlobalData::measurer, and QBenchmarkMeasurerBase::start().
Referenced by QTest::QBenchmarkIterationController::QBenchmarkIterationController(), and QTest::QBenchmarkIterationController::QBenchmarkIterationController().
const char * QTest::benchmarkMetricName | ( | QBenchmarkMetric | metric | ) |
Definition at line 104 of file qbenchmarkmetric.cpp.
References entries, QTest::QBenchmarkMetricKey::name, and NumEntries.
Referenced by QCsvBenchmarkLogger::addBenchmarkResult().
const char * QTest::benchmarkMetricUnit | ( | QBenchmarkMetric | metric | ) |
Definition at line 116 of file qbenchmarkmetric.cpp.
References entries, NumEntries, and QTest::QBenchmarkMetricKey::unit.
|
static |
Definition at line 131 of file qplaintestlogger.cpp.
|
static |
Definition at line 192 of file qxmltestlogger.cpp.
Referenced by QXmlTestLogger::addBenchmarkResult().
bool QTest::compare_helper | ( | bool | success, |
const char * | failureMsg, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
This overload should be used when there is no string representation of actual and expected values, so only the failureMsg is shown when the comparison fails. Because of that, failureMsg can't be {nullptr}
. If the comparison succeeds, failureMsg will not be output.
Definition at line 3163 of file qtestcase.cpp.
References QTestResult::compare(), expected, file, and line.
bool QTest::compare_helper | ( | bool | success, |
const char * | failureMsg, | ||
qxp::function_ref< const char *()> | actualVal, | ||
qxp::function_ref< const char *()> | expectedVal, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
The failureMsg parameter can be {nullptr}
, in which case a default message will be output if the compare fails. If the comparison succeeds, failureMsg will not be output.
This overload of the function uses qxp::function_ref to defer conversion of actualVal and expectedVal to strings until that is really needed (when the comparison fails). This speeds up test case execution on success.
Definition at line 3142 of file qtestcase.cpp.
References CustomCompare, expected, file, line, and QTestResult::reportResult().
Referenced by _q_compareSequence(), compare_ptr_helper(), compare_ptr_helper(), compare_ptr_helper(), compare_ptr_helper(), compare_ptr_helper(), compare_ptr_helper(), compare_string_helper(), qCompare(), qCompare(), qCompare(), and qCompare().
|
inline |
Definition at line 521 of file qtestcase.h.
References compare_helper(), expected, file, line, t2, and toString().
|
inline |
Definition at line 529 of file qtestcase.h.
References compare_helper(), expected, file, line, and toString().
|
inline |
Definition at line 513 of file qtestcase.h.
References compare_helper(), expected, file, line, t2, and toString().
Referenced by qCompare(), qCompare(), qCompare(), qCompare(), qCompare(), and qCompare().
|
inline |
Definition at line 545 of file qtestcase.h.
References compare_helper(), expected, file, line, and toString().
|
inline |
Definition at line 537 of file qtestcase.h.
References compare_helper(), expected, file, line, t2, and toString().
|
inline |
Definition at line 553 of file qtestcase.h.
References compare_helper(), expected, file, line, t2, and toString().
bool QTest::compare_string_helper | ( | const char * | t1, |
const char * | t2, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 3515 of file qtestcase.cpp.
References compare_helper(), expected, file, line, qstrcmp(), t2, and toString().
Referenced by qCompare(), qCompare(), qCompare(), and qCompare().
|
static |
Definition at line 158 of file qplaintestlogger.cpp.
References digits().
Q_GUI_EXPORT QPointingDevice * QTest::createTouchDevice | ( | QInputDevice::DeviceType | devType = QInputDevice::DeviceType::TouchScreen , |
QInputDevice::Capabilities | caps = QInputDevice::Capability::Position |
||
) |
Definition at line 1210 of file qwindowsysteminterface.cpp.
References createTouchDevice(), QPointingDevice::Finger, nextId, QWindowSystemInterface::registerInputDevice(), and ret.
Referenced by createTouchDevice(), and processTouchEvent().
const char * QTest::currentAppName | ( | ) |
Returns the name of the binary that is currently executed.
Definition at line 3013 of file qtestcase.cpp.
References QTestResult::currentAppName().
const char * QTest::currentDataTag | ( | ) |
Returns the name of the current test data.
If the test doesn't have any assigned testdata, the function returns \nullptr.
Definition at line 3034 of file qtestcase.cpp.
References QTestResult::currentDataTag().
bool QTest::currentTestFailed | ( | ) |
Returns true
if the current test function has failed, otherwise false.
Definition at line 3044 of file qtestcase.cpp.
References QTestResult::currentTestFailed().
const char * QTest::currentTestFunction | ( | ) |
Returns the name of the test function that is currently executed.
Example:
Definition at line 3025 of file qtestcase.cpp.
References QTestResult::currentTestFunction().
Referenced by MyTestClass::cleanup(), and printTestRunTime().
bool QTest::currentTestResolved | ( | ) |
true
if the current test function has failed or skipped.This applies if the test has failed or exercised a skip. When it is true, the test function should return early. In particular, the {QTRY_*} macros and the test event loop terminate their loops early if executed during the test function (but not its cleanup()). After a test has called a helper function that uses this module's macros, it can use this function to test whether to return early.
Definition at line 3062 of file qtestcase.cpp.
References QTestResult::currentTestFailed(), and QTestResult::skipCurrentTest().
Referenced by QTestEventLoop::enterLoop().
int QTest::defaultEventDelay | ( | ) |
Definition at line 550 of file qtestcase.cpp.
References QByteArray::constData(), eventDelay, QByteArray::isEmpty(), and qgetenv().
Referenced by defaultKeyDelay(), and defaultMouseDelay().
int Q_TESTLIB_EXPORT QTest::defaultKeyDelay | ( | ) |
Definition at line 574 of file qtestcase.cpp.
References QByteArray::constData(), defaultEventDelay(), QByteArray::isEmpty(), keyDelay, and qgetenv().
int Q_TESTLIB_EXPORT QTest::defaultMouseDelay | ( | ) |
Definition at line 562 of file qtestcase.cpp.
References QByteArray::constData(), defaultEventDelay(), QByteArray::isEmpty(), mouseDelay, and qgetenv().
Referenced by QuickTestEvent::defaultMouseDelay(), QtQuickTest::mouseEvent(), mouseEvent(), QQuickTest::pointerMove(), QQuickTest::pointerPress(), and QQuickTest::pointerRelease().
QList< QBenchmarkMeasurerBase::Measurement > QTest::endBenchmarkMeasurement | ( | ) |
Definition at line 216 of file qbenchmark.cpp.
References QBenchmarkGlobalData::current, QBenchmarkGlobalData::measurer, and QBenchmarkMeasurerBase::stop().
Referenced by QTest::QBenchmarkIterationController::~QBenchmarkIterationController().
void QTest::failOnWarning | ( | const char * | message | ) |
Definition at line 2596 of file qtestcase.cpp.
References QTestLog::failOnWarning().
Referenced by QQmlDataTest::init().
Definition at line 1451 of file qtestcase.cpp.
References QMetaType::name(), Q_UNLIKELY, qFatal, QTEST_ASSERT, and QTEST_ASSERT_X.
Referenced by qData(), and qGlobalData().
QByteArray QTest::formatResult | ( | T | number, |
int | significantDigits | ||
) |
Definition at line 175 of file qplaintestlogger.cpp.
References QByteArray::append(), QByteArray::at(), QByteArray::chop(), i, QByteArray::insert(), QByteArray::isEmpty(), number, QByteArray::number(), qMin(), QByteArray::remove(), and QByteArray::size().
Q_TESTLIB_EXPORT char * QTest::formatString | ( | const char * | prefix, |
const char * | suffix, | ||
size_t | numArguments, | ||
... | |||
) |
Definition at line 1476 of file qtestcase.cpp.
References arguments, QList< T >::constData(), i, and qstrdup().
Referenced by toString(), and toString().
|
static |
Definition at line 180 of file qtestlog.cpp.
References QTestResult::addFailure(), context, failOnWarningList, qPrintable, and qsnprintf().
Referenced by messageHandler().
Definition at line 154 of file qtestlog.cpp.
References ignoreResultList, list, mutex, and QTest::IgnoreResultList::next.
Referenced by messageHandler().
|
static |
Definition at line 51 of file qtestresult.cpp.
References QTest::Internal::failed.
Referenced by QTestResult::currentTestFailed(), QTestResult::finishedCurrentTestData(), and QTestResult::finishedCurrentTestDataCleanup().
Ignores messages created by qDebug(), qInfo() or qWarning().
If the message with the corresponding type is outputted, it will be removed from the test log. If the test finished and the message was not outputted, a test failure is appended to the test log.
Example:
The example above tests that QDir::mkdir() outputs the right warning when invoked with an invalid file name.
Definition at line 2561 of file qtestcase.cpp.
References QTestLog::ignoreMessage().
Referenced by tstQDir().
|
static |
Definition at line 173 of file qxmltestlogger.cpp.
Referenced by QXmlTestLogger::addIncident().
Invoke a method of the object without generating warning if the method does not exist
Definition at line 540 of file qtestcase.cpp.
References Qt::DirectConnection, metaObject(), method, and methodName().
Referenced by qPrintDataTags().
|
inlinestatic |
Definition at line 168 of file qxmltestlogger.cpp.
References str.
Referenced by QXmlTestLogger::addIncident(), and QXmlTestLogger::addMessage().
int QTest::iterationCount | ( | ) |
Definition at line 186 of file qbenchmark.cpp.
References QBenchmarkTestMethodData::current, and QBenchmarkTestMethodData::iterationCount.
Referenced by QTest::QBenchmarkIterationController::isDone().
|
inlinestatic |
Definition at line 127 of file qtestkeyboard.h.
References Click, keyEvent(), and window().
|
inlinestatic |
Definition at line 125 of file qtestkeyboard.h.
References Click, keyEvent(), and window().
Referenced by QQuickDialogTestUtils::enterText(), QuickTestEvent::keyClick(), and QuickTestEvent::keyClickChar().
|
inlinestatic |
Definition at line 118 of file qtestkeyboard.h.
References asciiToKey(), sendKeyEvent(), and window().
Referenced by keyClick(), keyClick(), keyPress(), keyPress(), keyRelease(), and keyRelease().
|
inlinestatic |
Definition at line 121 of file qtestkeyboard.h.
References keyToAscii(), sendKeyEvent(), and window().
|
inlinestatic |
Definition at line 133 of file qtestkeyboard.h.
References keyEvent(), Press, and window().
Referenced by QuickTestEvent::keyPress(), and QuickTestEvent::keyPressChar().
|
inlinestatic |
Definition at line 135 of file qtestkeyboard.h.
References keyEvent(), Press, and window().
|
inlinestatic |
Definition at line 129 of file qtestkeyboard.h.
References keyEvent(), Release, and window().
Referenced by QuickTestEvent::keyRelease(), and QuickTestEvent::keyReleaseChar().
|
inlinestatic |
Definition at line 131 of file qtestkeyboard.h.
References keyEvent(), Release, and window().
char QTest::keyToAscii | ( | Qt::Key | key | ) |
Convert a Qt Key to an ascii char value. If the Qt key is unknown a 0 is returned.
Note: this may happen more than you like since not all known Qt keys are converted already. So feel free to add all the keys you need.
Definition at line 203 of file qasciikey.cpp.
References Qt::Key_0, Qt::Key_1, Qt::Key_2, Qt::Key_3, Qt::Key_4, Qt::Key_5, Qt::Key_6, Qt::Key_7, Qt::Key_8, Qt::Key_9, Qt::Key_A, Qt::Key_Aacute, Qt::Key_Acircumflex, Qt::Key_acute, Qt::Key_Adiaeresis, Qt::Key_AE, Qt::Key_Agrave, Qt::Key_Alt, Qt::Key_Ampersand, Qt::Key_Apostrophe, Qt::Key_Aring, Qt::Key_AsciiCircum, Qt::Key_AsciiTilde, Qt::Key_Asterisk, Qt::Key_At, Qt::Key_Atilde, Qt::Key_B, Qt::Key_Back, Qt::Key_Backslash, Qt::Key_Backspace, Qt::Key_Backtab, Qt::Key_Bar, Qt::Key_BassBoost, Qt::Key_BassDown, Qt::Key_BassUp, Qt::Key_BraceLeft, Qt::Key_BraceRight, Qt::Key_BracketLeft, Qt::Key_BracketRight, Qt::Key_brokenbar, Qt::Key_C, Qt::Key_CapsLock, Qt::Key_Ccedilla, Qt::Key_cedilla, Qt::Key_cent, Qt::Key_Clear, Qt::Key_Colon, Qt::Key_Comma, Qt::Key_Control, Qt::Key_copyright, Qt::Key_currency, Qt::Key_D, Qt::Key_degree, Qt::Key_Delete, Qt::Key_diaeresis, Qt::Key_Direction_L, Qt::Key_Direction_R, Qt::Key_division, Qt::Key_Dollar, Qt::Key_Down, Qt::Key_E, Qt::Key_Eacute, Qt::Key_Ecircumflex, Qt::Key_Ediaeresis, Qt::Key_Egrave, Qt::Key_End, Qt::Key_Enter, Qt::Key_Equal, Qt::Key_Escape, Qt::Key_ETH, Qt::Key_Exclam, Qt::Key_exclamdown, Qt::Key_F, Qt::Key_F1, Qt::Key_F10, Qt::Key_F11, Qt::Key_F12, Qt::Key_F13, Qt::Key_F14, Qt::Key_F15, Qt::Key_F16, Qt::Key_F17, Qt::Key_F18, Qt::Key_F19, Qt::Key_F2, Qt::Key_F20, Qt::Key_F21, Qt::Key_F22, Qt::Key_F23, Qt::Key_F24, Qt::Key_F25, Qt::Key_F26, Qt::Key_F27, Qt::Key_F28, Qt::Key_F29, Qt::Key_F3, Qt::Key_F30, Qt::Key_F31, Qt::Key_F32, Qt::Key_F33, Qt::Key_F34, Qt::Key_F35, Qt::Key_F4, Qt::Key_F5, Qt::Key_F6, Qt::Key_F7, Qt::Key_F8, Qt::Key_F9, Qt::Key_Favorites, Qt::Key_Forward, Qt::Key_G, Qt::Key_Greater, Qt::Key_guillemotleft, Qt::Key_guillemotright, Qt::Key_H, Qt::Key_Help, Qt::Key_Home, Qt::Key_HomePage, Qt::Key_Hyper_L, Qt::Key_Hyper_R, Qt::Key_hyphen, Qt::Key_I, Qt::Key_Iacute, Qt::Key_Icircumflex, Qt::Key_Idiaeresis, Qt::Key_Igrave, Qt::Key_Insert, Qt::Key_J, Qt::Key_K, Qt::Key_L, Qt::Key_Launch0, Qt::Key_Launch1, Qt::Key_Launch2, Qt::Key_Launch3, Qt::Key_Launch4, Qt::Key_Launch5, Qt::Key_Launch6, Qt::Key_Launch7, Qt::Key_Launch8, Qt::Key_Launch9, Qt::Key_LaunchA, Qt::Key_LaunchB, Qt::Key_LaunchC, Qt::Key_LaunchD, Qt::Key_LaunchE, Qt::Key_LaunchF, Qt::Key_LaunchMail, Qt::Key_LaunchMedia, Qt::Key_Left, Qt::Key_Less, Qt::Key_M, Qt::Key_macron, Qt::Key_masculine, Qt::Key_MediaNext, Qt::Key_MediaPlay, Qt::Key_MediaPrevious, Qt::Key_MediaRecord, Qt::Key_MediaStop, Qt::Key_Menu, Qt::Key_Meta, Qt::Key_Minus, Qt::Key_mu, Qt::Key_multiply, Qt::Key_N, Qt::Key_No, Qt::Key_nobreakspace, Qt::Key_notsign, Qt::Key_Ntilde, Qt::Key_NumberSign, Qt::Key_NumLock, Qt::Key_O, Qt::Key_Oacute, Qt::Key_Ocircumflex, Qt::Key_Odiaeresis, Qt::Key_Ograve, Qt::Key_onehalf, Qt::Key_onequarter, Qt::Key_onesuperior, Qt::Key_Ooblique, Qt::Key_OpenUrl, Qt::Key_ordfeminine, Qt::Key_Otilde, Qt::Key_P, Qt::Key_PageDown, Qt::Key_PageUp, Qt::Key_paragraph, Qt::Key_ParenLeft, Qt::Key_ParenRight, Qt::Key_Pause, Qt::Key_Percent, Qt::Key_Period, Qt::Key_periodcentered, Qt::Key_Plus, Qt::Key_plusminus, Qt::Key_Print, Qt::Key_Q, Qt::Key_Question, Qt::Key_questiondown, Qt::Key_QuoteDbl, Qt::Key_QuoteLeft, Qt::Key_R, Qt::Key_Refresh, Qt::Key_registered, Qt::Key_Return, Qt::Key_Right, Qt::Key_S, Qt::Key_ScrollLock, Qt::Key_Search, Qt::Key_section, Qt::Key_Select, Qt::Key_Semicolon, Qt::Key_Shift, Qt::Key_Slash, Qt::Key_Space, Qt::Key_ssharp, Qt::Key_Standby, Qt::Key_sterling, Qt::Key_Stop, Qt::Key_Super_L, Qt::Key_Super_R, Qt::Key_SysReq, Qt::Key_T, Qt::Key_Tab, Qt::Key_THORN, Qt::Key_threequarters, Qt::Key_threesuperior, Qt::Key_TrebleDown, Qt::Key_TrebleUp, Qt::Key_twosuperior, Qt::Key_U, Qt::Key_Uacute, Qt::Key_Ucircumflex, Qt::Key_Udiaeresis, Qt::Key_Ugrave, Qt::Key_Underscore, Qt::Key_Up, Qt::Key_V, Qt::Key_VolumeDown, Qt::Key_VolumeMute, Qt::Key_VolumeUp, Qt::Key_W, Qt::Key_X, Qt::Key_Y, Qt::Key_Yacute, Qt::Key_ydiaeresis, Qt::Key_yen, Qt::Key_Yes, Qt::Key_Z, and QTEST_ASSERT.
Referenced by keyEvent().
|
static |
Definition at line 197 of file qxmltestlogger.cpp.
Referenced by QXmlTestLogger::addMessage().
|
static |
Definition at line 206 of file qtestlog.cpp.
References QTestResult::addFailure(), context, FOREACH_TEST_LOGGER, handleFailOnWarning(), handleIgnoredMessage(), QTestLog::hasLoggers(), QTestLog::leaveTestFunction(), maxWarnings, oldMessageHandler, Q_BASIC_ATOMIC_INITIALIZER, qInstallMessageHandler(), QStringLiteral, QTEST_ASSERT, QtFatalMsg, QtWarningMsg, QTestLog::stopLogging(), and QAbstractTestLogger::Warn.
Referenced by QTestLog::startLogging().
|
inline |
Definition at line 137 of file qtestmouse.h.
References button, MouseClick, mouseEvent(), pos, and window().
Referenced by QQuickControlsTestUtils::clickButton().
|
inline |
Definition at line 141 of file qtestmouse.h.
References button, MouseDClick, mouseEvent(), pos, and window().
Referenced by QQuickControlsTestUtils::doubleClickButton().
|
static |
This function creates a QPA mouse event of type specified by action and calls QWindowSystemInterface::handleMouseEvent(), simulating the windowing system and bypassing the platform plugin. delay is the amount of time to be added to the simulated clock so that QInputEvent::timestamp() will be greater than that of the previous event. We expect all event-handling code to rely on the event timestamps, not the system clock; therefore tests can be run faster than real-time.
If delay is not given, a default minimum mouse delay is used, and unintended double-click events are prevented by incrementing the timestamp by 500ms after each mouse release. Therefore, to test double-clicks, it's necessary to give a realistic delay value (for example, 10ms).
Definition at line 67 of file qtestmouse.h.
References button, defaultMouseDelay(), global, QSize::height(), Qt::KeyboardModifierMask, lastMouseTimestamp, QEvent::MouseButtonPress, QEvent::MouseButtonRelease, MouseClick, MouseDClick, mouseDoubleClickInterval, QEvent::MouseMove, MouseMove, MousePress, MouseRelease, Qt::NoButton, pos, Q_FALLTHROUGH, qApp, qMax(), qt_handleMouseEvent(), QTEST_ASSERT, qWarning, QSize::width(), and window().
Referenced by mouseClick(), mouseDClick(), mouseMove(), mousePress(), and mouseRelease().
Definition at line 145 of file qtestmouse.h.
References mouseEvent(), MouseMove, Qt::NoButton, pos, and window().
Referenced by QQuickViewTestUtils::flick(), QQuickViewTestUtils::moveAndPress(), QQuickViewTestUtils::moveAndRelease(), and QQuickTest::pointerMove().
|
inline |
Definition at line 129 of file qtestmouse.h.
References button, mouseEvent(), MousePress, pos, and window().
Referenced by QQuickViewTestUtils::moveAndPress(), and QQuickTest::pointerPress().
|
inline |
Definition at line 133 of file qtestmouse.h.
References button, mouseEvent(), MouseRelease, pos, and window().
Referenced by QQuickViewTestUtils::moveAndRelease(), and QQuickTest::pointerRelease().
QTestData & QTest::newRow | ( | const char * | dataTag | ) |
Appends a new row to the current test data.
The test output will identify the test run with this test data using the name dataTag.
Returns a QTestData reference that can be used to stream in data, one value for each column in the table.
Example:
See \l {Chapter 2: Data Driven Testing}{Data Driven Testing} for a more extensive example.
Definition at line 2928 of file qtestcase.cpp.
References QTestTable::currentTestTable(), QTestTable::elementCount(), QTestTable::newData(), and QTEST_ASSERT_X.
Referenced by MyTestClass::addDataRow(), MyTestClass::addSingleStringRows(), QQuickControlsTestUtils::addTestRowForEachControl(), QuickTestResult::setDataTag(), tst_Skip::test_data(), and TestQString::toInt_data().
|
static |
Definition at line 1330 of file qtestcase.cpp.
References QTestTable::dataCount(), QTestData::dataTag(), i, tag, and QTestTable::testData().
|
static |
Definition at line 106 of file qplaintestlogger.cpp.
References QAbstractTestLogger::BlacklistedFail, QAbstractTestLogger::BlacklistedPass, QAbstractTestLogger::BlacklistedXFail, QAbstractTestLogger::BlacklistedXPass, QAbstractTestLogger::Fail, QAbstractTestLogger::Pass, QAbstractTestLogger::Skip, QAbstractTestLogger::XFail, and QAbstractTestLogger::XPass.
Referenced by QPlainTestLogger::addIncident().
|
static |
Definition at line 136 of file qplaintestlogger.cpp.
References QAbstractTestLogger::Info, QAbstractTestLogger::QCritical, QAbstractTestLogger::QDebug, QAbstractTestLogger::QFatal, QAbstractTestLogger::QInfo, QAbstractTestLogger::QWarning, and QAbstractTestLogger::Warn.
Referenced by QPlainTestLogger::addMessage(), and QPlainTestLogger::enterTestFunction().
QTest::Q_GLOBAL_STATIC | ( | TestRegistry | , |
g_registry | |||
) |
void QTest::qCaught | ( | const char * | expected, |
const char * | what, | ||
const char * | file, | ||
int | line | ||
) |
Executes qFail() following a failed QVERIFY_THROWS_EXCEPTION or QVERIFY_THROWS_NO_EXCEPTION, passing a suitable message created from expected, what, along with file and line.
The expected parameter contains the type of the exception that is expected to be thrown, or \nullptr, if no exception was expected.
The what parameter contains the result of {std::exception::what()}, or nullptr, if a non-
{std::exception}-derived exception was caught.
The file and line parameters hold expansions of the {FILE} and
{LINE} macros, respectively.
Definition at line 2516 of file qtestcase.cpp.
References QString::asprintf(), expected, file, line, and qFail().
void QTest::qCleanup | ( | ) |
Definition at line 2395 of file qtestcase.cpp.
References QBenchmarkGlobalData::CallgrindParentProcess, QTestTable::clearGlobalTestTable(), QBenchmarkGlobalData::current, currentTestObject, and QTestLog::stopLogging().
Referenced by qExec(), qRun(), and runTests().
|
inline |
Definition at line 650 of file qtestcase.h.
References compare_string_helper(), expected, file, line, and t2.
|
inline |
Definition at line 659 of file qtestcase.h.
References compare_string_helper(), expected, file, line, and t2.
|
inline |
Definition at line 664 of file qtestcase.h.
References compare_string_helper(), expected, file, line, and t2.
|
inline |
Definition at line 645 of file qtestcase.h.
References compare_string_helper(), expected, file, line, and t2.
bool QTest::qCompare | ( | const QLatin1StringView & | t1, |
QStringView | t2, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 3289 of file qtestcase.cpp.
References QTestResult::compare(), expected, file, line, and t2.
|
inline |
Definition at line 494 of file qtestcase.h.
References expected, file, line, qCompare(), and t2.
|
inline |
Definition at line 607 of file qtestcase.h.
References compare_ptr_helper(), expected, file, line, and t2.
|
inline |
Definition at line 586 of file qtestcase.h.
References compare_helper(), expected, file, line, t2, and toString().
|
inline |
Definition at line 633 of file qtestcase.h.
References compare_ptr_helper(), expected, file, line, and t2.
bool QTest::qCompare | ( | double const & | t1, |
double const & | t2, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 3214 of file qtestcase.cpp.
References QTestResult::compare(), expected, file, floatingCompare(), line, and t2.
|
inline |
Definition at line 594 of file qtestcase.h.
References expected, file, line, qCompare(), and t2.
|
inline |
Definition at line 600 of file qtestcase.h.
References expected, file, line, qCompare(), and t2.
bool QTest::qCompare | ( | float const & | t1, |
float const & | t2, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 3203 of file qtestcase.cpp.
References QTestResult::compare(), expected, file, floatingCompare(), line, and t2.
bool QTest::qCompare | ( | int | t1, |
int | t2, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 3226 of file qtestcase.cpp.
References QTestResult::compare(), expected, file, line, and t2.
|
inline |
|
inline |
bool QTest::qCompare | ( | qfloat16 const & | t1, |
qfloat16 const & | t2, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 3191 of file qtestcase.cpp.
References compare_helper(), expected, file, floatingCompare(), line, t2, and toString().
|
inline |
Definition at line 116 of file qtest_gui.h.
References expected, file, line, qCompare(), QTEST_ASSERT, and t2.
|
inline |
Definition at line 124 of file qtest_gui.h.
References compare_helper(), expected, file, line, qFuzzyCompare(), qsnprintf(), and t2.
|
inline |
bool QTest::qCompare | ( | QList< T > const & | t1, |
const T(&) | t2[N], | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
bool QTest::qCompare | ( | QList< T > const & | t1, |
std::initializer_list< T > | t2, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
|
inline |
Definition at line 166 of file qtest_gui.h.
References compare_helper(), expected, file, line, qCompare(), qFuzzyCompare(), qsnprintf(), and t2.
|
inline |
Definition at line 405 of file qtest.h.
References expected, file, line, qCompare(), and t2.
Referenced by qCompare(), qCompare(), qCompare(), qCompare(), qCompare(), qCompare(), qCompare(), qCompare(), qCompare(), qCompare(), qCompare(), qCompare(), qCompare(), qCompare(), qCompare(), and qTest().
bool QTest::qCompare | ( | QStringView | t1, |
const QLatin1StringView & | t2, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 3277 of file qtestcase.cpp.
References QTestResult::compare(), expected, file, line, and t2.
bool QTest::qCompare | ( | QStringView | t1, |
QStringView | t2, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 3265 of file qtestcase.cpp.
References QTestResult::compare(), expected, file, line, and t2.
|
inline |
Definition at line 626 of file qtestcase.h.
References compare_ptr_helper(), expected, file, line, and t2.
|
inline |
Definition at line 620 of file qtestcase.h.
References compare_ptr_helper(), expected, file, and line.
|
inline |
Definition at line 613 of file qtestcase.h.
References compare_ptr_helper(), expected, file, line, and t2.
|
inline |
Definition at line 639 of file qtestcase.h.
References compare_ptr_helper(), expected, file, line, and t2.
bool QTest::qCompare | ( | unsigned | t1, |
unsigned | t2, | ||
const char * | actual, | ||
const char * | expected, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 3253 of file qtestcase.cpp.
References QTestResult::compare(), expected, file, line, and t2.
void * QTest::qData | ( | const char * | tagName, |
int | typeId | ||
) |
Definition at line 2870 of file qtestcase.cpp.
References QTestResult::currentTestData(), and fetchData().
void * QTest::qElementData | ( | const char * | tagName, |
int | metaTypeId | ||
) |
Definition at line 2884 of file qtestcase.cpp.
References QTestResult::currentTestData(), and QTEST_ASSERT.
Referenced by qTest().
int QTest::qExec | ( | QObject * | testObject, |
const QStringList & | arguments | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Behaves identically to qExec(QObject *, int, char**) but takes a QStringList of arguments instead of a char**
list.
Definition at line 2450 of file qtestcase.cpp.
References QList< T >::append(), args, arguments, QList< T >::at(), QVariant::constData(), QVarLengthArray< T, Prealloc >::data(), i, QList< T >::last(), qExec(), QList< T >::reserve(), QList< T >::size(), and testObject().
Executes tests declared in testObject.
In addition, the private slots {initTestCase()},
{cleanupTestCase()},
{init()} and
{cleanup()} are executed if they exist. See \l{Creating a Test} for more details.
Optionally, the command line arguments argc and argv can be provided. For a list of recognized arguments, read \l {Qt Test Command Line Arguments}.
The following example will run all tests in MyTestObject:
This function returns 0 if no tests failed, or a value other than 0 if one or more tests failed or in case of unhandled exceptions. (Skipped tests do not influence the return value.)
For stand-alone test applications, the convenience macro \l QTEST_MAIN() can be used to declare a main() function that parses the command line arguments and executes the tests, avoiding the need to call this function explicitly.
The return value from this function is also the exit code of the test application when the \l QTEST_MAIN() macro is used.
For stand-alone test applications, this function should not be called more than once, as command-line options for logging test output to files and executing individual test functions will not behave correctly.
If you have programmatically created the arguments, as opposed to getting them from the arguments in main()
, it is likely of interest to use QTest::qExec(QObject *, const QStringList &) since it is Unicode safe.
Definition at line 2244 of file qtestcase.cpp.
References qCleanup(), qInit(), qRun(), ret, and testObject().
Referenced by qExec(), and testObject().
bool QTest::qExpectFail | ( | const char * | dataIndex, |
const char * | comment, | ||
QTest::TestFailMode | mode, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 2494 of file qtestcase.cpp.
References QTestResult::expectFail(), file, line, and qstrdup().
void QTest::qFail | ( | const char * | message, |
const char * | file, | ||
int | line | ||
) |
Definition at line 2469 of file qtestcase.cpp.
References QTestResult::fail(), file, and line.
Referenced by qCaught().
QString QTest::qFindTestData | ( | const char * | base, |
const char * | file = nullptr , |
||
int | line = 0 , |
||
const char * | builddir = nullptr , |
||
const char * | sourcedir = nullptr |
||
) |
Definition at line 2862 of file qtestcase.cpp.
References base, QFile::decodeName(), file, line, and qFindTestData().
Referenced by QTestPrivate::parseBlackList(), and qFindTestData().
QString QTest::qFindTestData | ( | const QString & | base, |
const char * | file = nullptr , |
||
int | line = 0 , |
||
const char * | builddir = nullptr , |
||
const char * | sourcedir = nullptr |
||
) |
Definition at line 2725 of file qtestcase.cpp.
References QDir::absoluteFilePath(), QCoreApplication::applicationDirPath(), QString::arg(), arg, base, QFileInfo::canonicalFilePath(), canonicalPath(), QDir::cdUp(), QDir::currentPath(), QTestResult::currentTestObjectName(), QFile::decodeName(), QDir::dirName(), QDir::exists(), QFileInfo::exists(), file, QFileInfo::filePath(), QTestLog::info(), QFileInfo::isAbsolute(), QString::isEmpty(), line, mainSourcePath, QLibraryInfo::path(), qApp, qPrintable, qstrncmp(), QFileInfo::setFile(), QLibraryInfo::TestsPath, QDir::toNativeSeparators(), QTestLog::verboseLevel(), and QTestLog::warn().
void * QTest::qGlobalData | ( | const char * | tagName, |
int | typeId | ||
) |
Definition at line 2877 of file qtestcase.cpp.
References QTestResult::currentGlobalTestData(), and fetchData().
Definition at line 2258 of file qtestcase.cpp.
References QBenchmarkGlobalData::CallgrindParentProcess, QBenchmarkGlobalData::current, currentTestObject, QTestPrivate::disableWindowRestore(), QTestTable::globalTestTable(), initEnvironment(), maybeDisableCoreDump(), metaObject(), QTestPrivate::parseBlackList(), qApp, qstrcmp(), QTEST_ASSERT, qtest_qParseArgs(), QTestResult::reset(), QTestResult::setCurrentAppName(), QTestResult::setCurrentTestObject(), QTestLog::startLogging(), and testObject().
Referenced by runTests().
|
static |
Definition at line 1070 of file qtestcase.cpp.
References QList< T >::at(), QList< T >::begin(), QList< T >::end(), and QList< T >::size().
|
static |
Definition at line 624 of file qtestcase.cpp.
References QMetaObject::className(), QByteArray::constData(), currentTestObject, QByteArray::data(), QTestTable::dataCount(), QTestData::dataTag(), QTestTable::globalTestTable(), i, invokeMethod(), isValidSlot(), j, QMetaObject::method(), QMetaObject::methodCount(), QMetaMethod::methodSignature(), qsnprintf(), qstrdup(), qstrlen(), QByteArray::resize(), QTestLog::setPrintAvailableTagsMode(), QByteArray::size(), and QTestTable::testData().
Referenced by qtest_qParseArgs().
|
inlinestatic |
Definition at line 21 of file qsignaldumper.cpp.
References ba, QByteArray::constData(), and QTestLog::info().
Referenced by qSignalDumperCallback(), and qSignalDumperCallbackSlot().
|
static |
Definition at line 603 of file qtestcase.cpp.
References Qt::CaseInsensitive, QLatin1StringView::contains(), currentTestObject, i, isValidSlot(), matches(), QMetaMethod::methodSignature(), and preamble.
Referenced by qRun(), and qtest_qParseArgs().
int QTest::qRun | ( | ) |
Definition at line 2305 of file qtestcase.cpp.
References QTestResult::addFailure(), QCoreApplication::arguments(), QBenchmarkGlobalData::CallgrindParentProcess, QBenchmarkValgrindUtils::cleanup(), QByteArray::constData(), QBenchmarkGlobalData::current, QTestResult::currentAppName(), QTestResult::currentTestFunction(), currentTestObject, QTestLog::failCount(), QTestResult::finishedCurrentTestFunction(), QTest::TestMethods::invokeTests(), isValidSlot(), noCrashHandler, prepareStackTrace(), Q_UNLIKELY, qApp, QByteArrayLiteral, qCleanup(), qFatal, qMin(), qPrintable, qPrintTestSlots(), QTEST_ASSERT, QBenchmarkValgrindUtils::rerunThroughCallgrind(), QTestResult::setCurrentTestFunction(), testFunctions, and testTags.
Referenced by qExec(), and runTests().
|
static |
Definition at line 31 of file qsignaldumper.cpp.
References QString::append(), arg, args, QList< T >::at(), QString::chop(), contains(), QString::endsWith(), QString::fill(), QMetaType::fromName(), i, QMetaType::id(), ignoreLevel, iLevel, IndentSpacesCount, QString::isEmpty(), QMetaMethod::isValid(), mo, QMetaMethod::name(), QByteArray::number(), QObject::objectName, QMetaMethod::parameterTypes(), Q_ASSERT, Q_UNUSED, qPrintMessage(), QByteArray::rightJustified(), QMetaObjectPrivate::signal(), QList< T >::size(), str, QString::toLocal8Bit(), toLocal8Bit(), toString(), and QMetaType::UnknownType.
Referenced by QSignalDumper::startDump().
Definition at line 122 of file qsignaldumper.cpp.
References contains(), ignoreLevel, iLevel, and Q_ASSERT.
Referenced by QSignalDumper::startDump().
|
static |
Definition at line 90 of file qsignaldumper.cpp.
References contains(), QString::fill(), ignoreLevel, iLevel, IndentSpacesCount, QString::isEmpty(), QMetaMethod::isValid(), QMetaMethod::methodSignature(), mo, QByteArray::number(), QObject::objectName, Q_ASSERT, Q_UNUSED, qPrintMessage(), QByteArray::rightJustified(), str, and QString::toLocal8Bit().
Referenced by QSignalDumper::startDump().
void QTest::qSkip | ( | const char * | message, |
const char * | file, | ||
int | line | ||
) |
Definition at line 2485 of file qtestcase.cpp.
References QTestResult::addSkip(), file, line, and QTestResult::setSkipCurrentTest().
QT_BEGIN_NAMESPACE void QTest::qSleep | ( | int | ms | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sleeps for ms milliseconds, blocking execution of the test.
Equivalent to calling:
Definition at line 22 of file qtestsupport_core.cpp.
References qSleep().
Referenced by qSleep(), quarterSecondSleep(), qWait(), qWaitForSignal(), and QuickTestResult::sleep().
void QTest::qSleep | ( | std::chrono::milliseconds | msecs | ) |
Sleeps for msecs, blocking execution of the test.
This method will not do any event processing and will leave your test unresponsive. Network communication might time out while sleeping. Use \l {QTest::qWait()} to do non-blocking sleeping.
msecs must be greater than 0ms.
{std::this_thread::sleep_for}
, so the accuracy of time spent depends on the Standard Library implementation. Before Qt 6.7 this function called either nanosleep()
on Unix or Sleep()
on Windows, so the accuracy of time spent in this function depended on the operating system.Example:
Definition at line 49 of file qtestsupport_core.cpp.
References Q_ASSERT.
int QTest::qt_asprintf | ( | QTestCharBuffer * | str, |
const char * | format, | ||
... | |||
) |
Definition at line 384 of file qabstracttestlogger.cpp.
References QString::data(), Q_ASSERT, qt_asprintf(), qvsnprintf(), QString::size(), and str.
Referenced by QXmlTestLogger::addBenchmarkResult(), QTapTestLogger::addIncident(), QTeamCityLogger::addIncident(), QXmlTestLogger::addIncident(), QTapTestLogger::addMessage(), QXmlTestLogger::addMessage(), QXmlTestLogger::enterTestFunction(), QTestJUnitStreamer::formatAfterAttributes(), QTestJUnitStreamer::formatEnd(), QTestJUnitStreamer::formatStart(), QTestPrivate::generateTestIdentifier(), QXmlTestLogger::leaveTestFunction(), qt_asprintf(), QTapTestLogger::startLogging(), QTeamCityLogger::startLogging(), QXmlTestLogger::startLogging(), QTapTestLogger::stopLogging(), QTeamCityLogger::stopLogging(), and QXmlTestLogger::stopLogging().
|
inline |
Definition at line 671 of file qtestcase.h.
References expected, file, line, qCompare(), and qElementData().
void QTest::qtest_qParseArgs | ( | int | argc, |
char * | argv[], | ||
bool | qml | ||
) |
Definition at line 1066 of file qtestcase.cpp.
References qtest_qParseArgs().
Q_TESTLIB_EXPORT void QTest::qtest_qParseArgs | ( | int | argc, |
const char *const | argv[], | ||
bool | qml | ||
) |
Definition at line 702 of file qtestcase.cpp.
References QTestLog::addLogger(), QBenchmarkGlobalData::CallgrindChildProcess, QBenchmarkGlobalData::callgrindOutFileBase, QBenchmarkGlobalData::CallgrindParentProcess, QXcodeTestLogger::canLogTestProgress(), QTestLog::CSV, QBenchmarkGlobalData::current, QTestResult::currentAppName(), QDir::currentPath(), QTestResult::currentTestObjectName(), QBenchmarkGlobalData::EventCounter, eventDelay, QString::fromLatin1(), QTestLog::hasLoggers(), QBenchmarkValgrindUtils::haveValgrind(), i, installCoverageTool(), installedTestCoverage, QBenchmarkPerfEventsMeasurer::isAvailable(), QBenchmarkGlobalData::iterationCount, QTestLog::JUnitXML, keyDelay, QTestLog::LightXML, QBenchmarkPerfEventsMeasurer::listCounters(), QTestLog::loggerUsingStdout(), QBenchmarkGlobalData::medianIterationCount, QBenchmarkGlobalData::minimumTotal, mouseDelay, noCrashHandler, QBenchmarkValgrindUtils::outFileBase(), QXcodeTestLogger::parseCommandLineArgument(), QBenchmarkGlobalData::PerfCounter, QTestLog::Plain, AppleUnifiedLogger::preventsStderrLogging(), printAvailableFunctions, qPrintDataTags(), qPrintTestSlots(), qToInt(), QBenchmarkPerfEventsMeasurer::setCounter(), QSignalDumper::setEnabled(), QTestLog::setInstalledTestCoverage(), QTestLog::setMaxWarnings(), QBenchmarkGlobalData::setMode(), QTestLog::setVerboseLevel(), QTestLog::TAP, QTestLog::TeamCity, testFunctions, testTags, QBenchmarkGlobalData::TickCounter, QBenchmarkGlobalData::verboseOutput, QBenchmarkGlobalData::walltimeMinimum, and QTestLog::XML.
Referenced by QuickTestResult::parseArgs(), qInit(), and qtest_qParseArgs().
|
static |
Definition at line 691 of file qtestcase.cpp.
References str.
Referenced by qtest_qParseArgs().
bool QTest::qVerify | ( | bool | statement, |
const char * | statementStr, | ||
const char * | description, | ||
const char * | file, | ||
int | line | ||
) |
Definition at line 2476 of file qtestcase.cpp.
References file, line, and QTestResult::verify().
Q_CORE_EXPORT void QTest::qWait | ( | int | msecs | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Waits for msecs.
Equivalent to calling:
Definition at line 92 of file qtestsupport_core.cpp.
References qWait().
Referenced by QQuickViewTestUtils::flick(), QQuickTest::initView(), MyObject::isReady(), QtQuickTest::mouseEvent(), QQuickVisualTestUtils::PointLerper::move(), quick_test_main_with_setup(), qWait(), and QuickTestResult::wait().
Q_CORE_EXPORT void QTest::qWait | ( | std::chrono::milliseconds | msecs | ) |
Waits for msecs. While waiting, events will be processed and your test will stay responsive to user interface events or network communication.
Example:
The code above will wait until the network server is responding for a maximum of about 12.5 seconds.
Definition at line 112 of file qtestsupport_core.cpp.
References QEventLoop::AllEvents, deadline, QEvent::DeferredDelete, QDeadlineTimer::hasExpired(), QCoreApplication::instance(), QDeadlineTimer::isForever(), Qt::PreciseTimer, QCoreApplication::processEvents(), Q_ASSERT, qSleep(), QDeadlineTimer::remainingTimeAsDuration(), and QCoreApplication::sendPostedEvents().
Definition at line 63 of file qtestsupport_core.h.
References predicate, and qWaitFor().
|
static |
Definition at line 20 of file qtestsupport_core.h.
Referenced by PlatformQuirks::isClipboardAvailable(), qWaitFor(), QQuickTest::qWaitForPolish(), QQuickTest::qWaitForPolish(), qWaitForWidgetWindow(), qWaitForWindowActive(), qWaitForWindowExposed(), and startup().
Q_WIDGETS_EXPORT bool QTest::qWaitForWindowActive | ( | QWidget * | widget, |
int | timeout = 5000 |
||
) |
Returns true
if widget is active within timeout milliseconds. Otherwise returns false
.
The method is useful in tests that call QWidget::show() and rely on the widget actually being active (i.e. being visible and having focus) before proceeding.
false
if another window prevents widget from becoming active.true
.Definition at line 48 of file qtestsupport_widgets.cpp.
References QGuiApplicationPrivate::platformIntegration(), Q_UNLIKELY, qWaitForWidgetWindow(), qWaitForWindowExposed(), qWarning, widget, window(), QWidget::window(), and QPlatformIntegration::WindowActivation.
QT_BEGIN_NAMESPACE Q_GUI_EXPORT bool QTest::qWaitForWindowActive | ( | QWindow * | window, |
int | timeout = 5000 |
||
) |
Returns true
, if window is active within timeout milliseconds. Otherwise returns false
.
The method is useful in tests that call QWindow::show() and rely on the window actually being active (i.e. being visible and having focus) before proceeding.
false
if another window prevents window from becoming active.true
.Definition at line 34 of file qtestsupport_gui.cpp.
References QGuiApplicationPrivate::platformIntegration(), Q_UNLIKELY, qWaitFor(), qWaitForWindowExposed(), qWarning, window(), and QPlatformIntegration::WindowActivation.
Referenced by quick_test_main_with_setup(), and QQuickDialogTestUtils::DialogTestHelper< DialogType, QuickDialogType >::waitForWindowActive().
Q_WIDGETS_EXPORT bool QTest::qWaitForWindowExposed | ( | QWidget * | widget, |
int | timeout = 5000 |
||
) |
Returns true
if widget is exposed within timeout milliseconds. Otherwise returns false
.
The method is useful in tests that call QWidget::show() and rely on the widget actually being being visible before proceeding.
false
.Definition at line 77 of file qtestsupport_widgets.cpp.
References qWaitForWidgetWindow(), widget, window(), and QWidget::window().
Q_GUI_EXPORT bool QTest::qWaitForWindowExposed | ( | QWindow * | window, |
int | timeout = 5000 |
||
) |
Returns true
, if window is exposed within timeout milliseconds. Otherwise returns false
.
The method is useful in tests that call QWindow::show() and rely on the window actually being being visible before proceeding.
false
.Definition at line 61 of file qtestsupport_gui.cpp.
References qWaitFor(), and window().
Referenced by quick_test_main_with_setup(), qWaitForWindowActive(), qWaitForWindowActive(), and QQuickTest::showView().
Q_TESTLIB_EXPORT 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 | ||
) |
Definition at line 1776 of file qtestcase.cpp.
References file, line, and QTestResult::reportResult().
|
static |
Definition at line 46 of file qtestresult.cpp.
References setFailed().
Referenced by QTestResult::finishedCurrentTestDataCleanup(), QTestResult::finishedCurrentTestFunction(), QTestResult::reset(), QTestResult::setCurrentTestData(), and QTestResult::setCurrentTestFunction().
bool QTest::runningTest | ( | ) |
true
during the run of the test-function and its set-up.Used by the {QTRY_*} macros and \l QTestEventLoop to check whether to return when QTest::currentTestResolved() is true.
Definition at line 3075 of file qtestcase.cpp.
References inTestFunction.
Referenced by QTestEventLoop::enterLoop().
|
static |
Definition at line 109 of file qtestkeyboard.h.
References QChar::fromLatin1(), sendKeyEvent(), text, and window().
|
static |
Definition at line 48 of file qtestkeyboard.h.
References Qt::AltModifier, Click, Qt::ControlModifier, QGuiApplication::focusWindow(), Qt::Key_Alt, Qt::Key_Control, Qt::Key_Meta, Qt::Key_Shift, Qt::MetaModifier, Press, ptr(), qApp, qt_sendShortcutOverrideEvent(), QTEST_ASSERT, Release, sendKeyEvent(), Qt::ShiftModifier, Shortcut, simulateEvent(), text, and window().
Referenced by keyEvent(), keyEvent(), sendKeyEvent(), and sendKeyEvent().
void QTest::setBenchmarkResult | ( | qreal | result, |
QTest::QBenchmarkMetric | metric | ||
) |
Sets the benchmark result for this test function to result.
Use this function if you want to report benchmark results without using the QBENCHMARK macro. Use metric to specify how Qt Test should interpret the results.
The context for the result will be the test function name and any data tag from the _data function. This function can only be called once in each test function, subsequent calls will replace the earlier reported results.
Note that the -iterations command line argument has no effect on test functions without the QBENCHMARK macro.
Definition at line 239 of file qbenchmark.cpp.
References QBenchmarkTestMethodData::current, and QBenchmarkTestMethodData::setResult().
|
static |
Definition at line 29 of file qtestresult.cpp.
References QTest::Internal::failed, ok, qEnvironmentVariableIntValue(), qEnvironmentVariableIsSet(), and qTerminate().
Referenced by QTestResult::addFailure(), checkStatement(), and resetFailed().
void QTest::setIterationCount | ( | int | count | ) |
Definition at line 200 of file qbenchmark.cpp.
References QBenchmarkTestMethodData::current, QBenchmarkTestMethodData::iterationCount, and QBenchmarkTestMethodData::resultAccepted.
void QTest::setIterationCountHint | ( | int | count | ) |
Definition at line 193 of file qbenchmark.cpp.
References QBenchmarkTestMethodData::adjustIterationCount(), and QBenchmarkTestMethodData::current.
Definition at line 3089 of file qtestcase.cpp.
References QFileInfo::absolutePath(), QFile::decodeName(), fi, file, mainSourcePath, and QFileInfo::setFile().
|
static |
Definition at line 39 of file qtestkeyboard.h.
References QEvent::KeyPress, QEvent::KeyRelease, qApp, qt_handleKeyEvent(), text, and window().
Referenced by QQuickVisualTestUtils::MnemonicKeySimulator::press(), QQuickVisualTestUtils::MnemonicKeySimulator::release(), and sendKeyEvent().
|
static |
Definition at line 24 of file qteamcitylogger.cpp.
References QAbstractTestLogger::BlacklistedFail, QAbstractTestLogger::BlacklistedPass, QAbstractTestLogger::BlacklistedXFail, QAbstractTestLogger::BlacklistedXPass, QAbstractTestLogger::Fail, QAbstractTestLogger::Pass, QAbstractTestLogger::Skip, QAbstractTestLogger::XFail, and QAbstractTestLogger::XPass.
Referenced by QTeamCityLogger::addIncident().
|
static |
Definition at line 49 of file qteamcitylogger.cpp.
References QAbstractTestLogger::Info, QAbstractTestLogger::QCritical, QAbstractTestLogger::QDebug, QAbstractTestLogger::QFatal, QAbstractTestLogger::QInfo, QAbstractTestLogger::QWarning, and QAbstractTestLogger::Warn.
Referenced by QTeamCityLogger::addMessage().
QObject * QTest::testObject | ( | ) |
Definition at line 3082 of file qtestcase.cpp.
References currentTestObject.
Referenced by QTest::TestMethods::invokeTests().
Q_TESTLIB_EXPORT 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.
If the input is considered too long, it is truncated. A trucation is indicated in the returned string as an ellipsis at the end. The caller has ownership of the returned pointer and must ensure it is later passed to operator delete[].
length is the length of the string ba.
Definition at line 1508 of file qtestcase.cpp.
References at, ba, i, o, qMin(), and qstrdup().
Q_TESTLIB_EXPORT char * QTest::toPrettyCString | ( | const char * | p, |
qsizetype | length | ||
) |
Returns the same QByteArray but with only the ASCII characters still shown; everything else is replaced with {\xHH
}.
Definition at line 1567 of file qtestcase.cpp.
References Q_UNLIKELY.
Referenced by toString().
Q_TESTLIB_EXPORT char * QTest::toPrettyUnicode | ( | QStringView | string | ) |
Returns the same QString but with only the ASCII characters still shown; everything else is replaced with {\uXXXX
}.
Similar to QDebug::putString().
Definition at line 1653 of file qtestcase.cpp.
Referenced by toString().
char * QTest::toString | ( | const char * | str | ) |
Definition at line 3446 of file qtestcase.cpp.
References qstrcpy(), and str.
char * QTest::toString | ( | const MyPoint & | point | ) |
Definition at line 24 of file src_qtestlib_qtestcase_snippet.cpp.
References ba, QByteArray::data(), QByteArray::number(), and qstrdup().
Referenced by _q_compareSequence(), QuickTestResult::compare(), compare_ptr_helper(), compare_ptr_helper(), compare_ptr_helper(), compare_ptr_helper(), compare_ptr_helper(), compare_ptr_helper(), QuickTestResult::expectFail(), QuickTestResult::expectFailContinue(), QTest::Internal::QCborValueFormatter::format(), formatFailMessage(), qCompare(), qSignalDumperCallback(), toString(), toString(), toString(), toString(), toString(), toString(), toString(), toString(), toString(), toString(), toString(), toString(), and toString< QHostAddress >().
|
inline |
|
inline |
Definition at line 66 of file qtest.h.
References ba, QByteArray::constData(), QByteArray::size(), and toPrettyCString().
|
inline |
Definition at line 349 of file qtest.h.
References QTest::Internal::QCborValueFormatter::format().
|
inline |
Definition at line 104 of file qtest.h.
References toString().
|
inline |
Definition at line 354 of file qtest.h.
References QTest::Internal::QCborValueFormatter::format().
|
inline |
Definition at line 339 of file qtest.h.
References QTest::Internal::QCborValueFormatter::format().
|
inline |
Definition at line 344 of file qtest.h.
References toString().
|
inline |
Definition at line 110 of file qtest.h.
References arg, QString::fromLatin1(), QString::number(), qPrintable, qsnprintf(), and qstrdup().
|
inline |
Definition at line 45 of file qtest_gui.h.
References QColor::HexArgb, and qstrdup().
Q_POSITIONING_EXPORT char * QTest::toString | ( | const QGeoAreaMonitorInfo & | info | ) |
Definition at line 396 of file qgeoareamonitorinfo.cpp.
References info, qPrintable, and qstrdup().
Q_POSITIONING_EXPORT char * QTest::toString | ( | const QGeoPositionInfo & | info | ) |
Definition at line 407 of file qgeopositioninfo.cpp.
References info, qPrintable, and qstrdup().
Q_POSITIONING_EXPORT char * QTest::toString | ( | const QGeoSatelliteInfo & | info | ) |
Definition at line 389 of file qgeosatelliteinfo.cpp.
References info, qPrintable, and qstrdup().
|
inline |
Definition at line 61 of file qtest.h.
References str, and toString().
|
inline |
Definition at line 63 of file qtest_network.h.
References QByteArray::chop(), QList< T >::isEmpty(), list, and toString().
|
inline |
Definition at line 58 of file qtest_network.h.
References QNetworkCookie::toRawForm(), and toString().
|
inline |
|
inline |
Definition at line 210 of file qtest.h.
References QPartialOrdering::Equivalent, QPartialOrdering::Greater, QPartialOrdering::Less, o, qstrdup(), and QPartialOrdering::Unordered.
|
inline |
Definition at line 130 of file qtest.h.
References qsnprintf(), and qstrdup().
|
inline |
Definition at line 152 of file qtest.h.
References qsnprintf(), and qstrdup().
|
inline |
Definition at line 144 of file qtest.h.
References qsnprintf(), and qstrdup().
|
inline |
Definition at line 166 of file qtest.h.
References qsnprintf(), and qstrdup().
|
inline |
Definition at line 50 of file qtest_gui.h.
References QRegion::begin(), i, QRegion::isEmpty(), QRegion::isNull(), QByteArray::number(), qstrdup(), and QRegion::rectCount().
|
inline |
Definition at line 137 of file qtest.h.
References qsnprintf(), and qstrdup().
|
inline |
Definition at line 159 of file qtest.h.
References qsnprintf(), and qstrdup().
|
inline |
Definition at line 56 of file qtest.h.
References str, and toString().
|
inline |
Definition at line 51 of file qtest.h.
References str, and toPrettyUnicode().
|
inline |
Definition at line 174 of file qtest.h.
References QByteArray::constData(), QUrl::errorString(), QUrl::isValid(), qPrintable, qstrdup(), and QUrl::toEncoded().
|
inline |
Definition at line 181 of file qtest.h.
References QByteArray::constData(), qstrdup(), and QUuid::toByteArray().
|
inline |
Definition at line 186 of file qtest.h.
References QByteArray::append(), QByteArray::constData(), QByteArray::number(), and qstrdup().
|
inline |
Definition at line 84 of file qtest_gui.h.
References QByteArray::number(), and qstrdup().
|
inline |
Definition at line 92 of file qtest_gui.h.
References QByteArray::number(), and qstrdup().
|
inline |
Definition at line 100 of file qtest_gui.h.
References QByteArray::number(), and qstrdup().
|
inline |
Definition at line 373 of file qtest.h.
References QScopedPointer< T, Cleanup >::data(), formatString(), and toString().
|
inline |
Definition at line 393 of file qtest.h.
References toString().
|
inline |
Definition at line 350 of file qtestcase.h.
References QTest::Internal::toString().
|
inline |
Definition at line 381 of file qtest.h.
References formatString(), get(), and toString().
char * QTest::toString | ( | const void * | p | ) |
Definition at line 3464 of file qtestcase.cpp.
References qsnprintf().
char * QTest::toString | ( | const volatile QObject * | vo | ) |
Definition at line 3473 of file qtestcase.cpp.
References className, o, qPrintable, qsnprintf(), and qstrdup().
char * QTest::toString | ( | const volatile void * | p | ) |
Definition at line 3459 of file qtestcase.cpp.
References toString().
|
inline |
Definition at line 47 of file qtest_network.h.
References mo, qstrdup(), and QMetaEnum::valueToKey().
|
inline |
Definition at line 81 of file qtest_widgets.h.
References qstrdup(), sp, and QTest::Internal::toString().
|
inline |
Definition at line 76 of file qtest_widgets.h.
References toString().
|
inline |
Definition at line 71 of file qtest_widgets.h.
References qstrdup(), and QTest::Internal::toString().
|
inline |
Definition at line 66 of file qtest_widgets.h.
References qstrdup(), and QTest::Internal::toString().
|
inline |
Definition at line 359 of file qtest.h.
References d, qSetRealNumberPrecision(), and qstrdup().
|
inline |
Definition at line 399 of file qtest.h.
References QStringLiteral, and toString().
|
inline |
Definition at line 32 of file qtest_network.h.
References QAbstractSocket::AnyIPProtocol, QAbstractSocket::IPv4Protocol, QAbstractSocket::IPv6Protocol, qstrdup(), toString(), and QAbstractSocket::UnknownNetworkLayerProtocol.
|
inline |
Definition at line 42 of file qtesttouch.h.
Referenced by QQuickTest::pointerMove(), QQuickTest::pointerPress(), QQuickTest::pointerRelease(), and processTouchEvent().
|
static |
Definition at line 41 of file qxmltestlogger.cpp.
References QAbstractTestLogger::BlacklistedFail, QAbstractTestLogger::BlacklistedPass, QAbstractTestLogger::BlacklistedXFail, QAbstractTestLogger::BlacklistedXPass, QAbstractTestLogger::Fail, QAbstractTestLogger::Pass, QAbstractTestLogger::Skip, QAbstractTestLogger::XFail, and QAbstractTestLogger::XPass.
Referenced by QXmlTestLogger::addIncident().
|
static |
Definition at line 20 of file qxmltestlogger.cpp.
References QAbstractTestLogger::Info, QAbstractTestLogger::QCritical, QAbstractTestLogger::QDebug, QAbstractTestLogger::QFatal, QAbstractTestLogger::QInfo, QAbstractTestLogger::QWarning, and QAbstractTestLogger::Warn.
Referenced by QXmlTestLogger::addMessage().
|
static |
Definition at line 61 of file qtestresult.cpp.
Referenced by QTestResult::addFailure(), checkStatement(), QTestResult::finishedCurrentTestDataCleanup(), QTestResult::reset(), and QTestResult::setBlacklistCurrentTest().
int QTest::blacklists = 0 |
Definition at line 80 of file qtestlog.cpp.
Referenced by QTestLog::addBFail(), QTestLog::addBPass(), QTestLog::addBXPass(), and QTestLog::blacklistCount().
Definition at line 57 of file qtestresult.cpp.
Referenced by QTestResult::currentGlobalDataTag(), QTestResult::currentGlobalTestData(), QTestResult::reset(), and QTestResult::setCurrentGlobalTestData().
Definition at line 56 of file qtestresult.cpp.
Referenced by QTestResult::currentDataTag(), QTestResult::currentTestData(), isExpectFailData(), QTestResult::reset(), and QTestResult::setCurrentTestData().
|
static |
Definition at line 58 of file qtestresult.cpp.
Referenced by QTestResult::currentTestFunction(), QTestResult::finishedCurrentTestFunction(), QTestResult::reset(), and QTestResult::setCurrentTestFunction().
Definition at line 469 of file qtestcase.cpp.
Referenced by qCleanup(), qInit(), qPrintDataTags(), qPrintTestSlots(), qRun(), and testObject().
|
static |
Definition at line 59 of file qtestresult.cpp.
Referenced by QTestResult::currentTestObjectName(), QTestResult::reset(), and QTestResult::setCurrentTestObject().
enum { ... } QTest::currentTestState |
|
static |
Definition at line 17 of file qbenchmarkmetric.cpp.
Referenced by benchmarkMetricName(), and benchmarkMetricUnit().
|
static |
Definition at line 531 of file qtestcase.cpp.
Referenced by defaultEventDelay(), and qtest_qParseArgs().
|
static |
Definition at line 63 of file qtestresult.cpp.
Referenced by checkStatement(), clearExpectFail(), QTestResult::expectFail(), and QTestResult::reset().
|
static |
Definition at line 64 of file qtestresult.cpp.
Referenced by checkStatement(), clearExpectFail(), compareHelper(), compareHelper(), QTestResult::expectFail(), QTestResult::finishedCurrentTestData(), QTestResult::reportResult(), QTestResult::reset(), and QTestResult::verify().
|
static |
Definition at line 144 of file qtestlog.cpp.
Referenced by QTestLog::clearFailOnWarnings(), QTestLog::failOnWarning(), and handleFailOnWarning().
int QTest::fails = 0 |
Definition at line 77 of file qtestlog.cpp.
Referenced by QTestLog::addFail(), QTestLog::addXPass(), QTestLog::failCount(), and QTestLog::resetCounters().
|
static |
Definition at line 28 of file qsignaldumper.cpp.
Referenced by qSignalDumperCallback(), qSignalDumperCallbackEndSignal(), and qSignalDumperCallbackSlot().
|
static |
Definition at line 141 of file qtestlog.cpp.
Referenced by QTestLog::clearIgnoreMessages(), handleIgnoredMessage(), QTestLog::ignoreMessage(), QTestLog::printUnhandledIgnoreMessages(), and QTestLog::unhandledIgnoreMessages().
|
static |
Definition at line 27 of file qsignaldumper.cpp.
Referenced by qSignalDumperCallback(), qSignalDumperCallbackEndSignal(), and qSignalDumperCallbackSlot().
|
static |
Definition at line 150 of file qtestlog.cpp.
Referenced by QTestLog::installedTestCoverage(), qtest_qParseArgs(), and QTestLog::setInstalledTestCoverage().
|
static |
Definition at line 471 of file qtestcase.cpp.
Referenced by runningTest().
|
static |
Definition at line 529 of file qtestcase.cpp.
Referenced by defaultKeyDelay(), and qtest_qParseArgs().
Q_TESTLIB_EXPORT int QTest::lastMouseTimestamp = 0 |
Definition at line 12 of file qtestmouse.cpp.
Referenced by mouseEvent(), QQuickTest::pointerMove(), QQuickTest::pointerPress(), and QQuickTest::pointerRelease().
|
static |
Definition at line 470 of file qtestcase.cpp.
Referenced by qFindTestData(), and setMainSourcePath().
|
static |
Definition at line 149 of file qtestlog.cpp.
Referenced by messageHandler(), and QTestLog::setMaxWarnings().
|
static |
Definition at line 530 of file qtestcase.cpp.
Referenced by defaultMouseDelay(), and qtest_qParseArgs().
|
static |
Definition at line 49 of file qtestmouse.h.
Referenced by mouseEvent().
|
static |
Definition at line 142 of file qtestlog.cpp.
Referenced by QTestLog::clearIgnoreMessages(), handleIgnoredMessage(), QTestLog::ignoreMessage(), QTestLog::printUnhandledIgnoreMessages(), and QTestLog::unhandledIgnoreMessages().
|
static |
Definition at line 535 of file qtestcase.cpp.
Referenced by qRun(), and qtest_qParseArgs().
Definition at line 50 of file qbenchmarkmetric.cpp.
Referenced by benchmarkMetricName(), and benchmarkMetricUnit().
|
static |
Definition at line 152 of file qtestlog.cpp.
Referenced by messageHandler(), QTestLog::startLogging(), and QTestLog::stopLogging().
int QTest::passes = 0 |
Definition at line 78 of file qtestlog.cpp.
Referenced by QTestLog::addPass(), QTestLog::passCount(), and QTestLog::resetCounters().
Q_TESTLIB_EXPORT bool QTest::printAvailableFunctions = false |
Definition at line 599 of file qtestcase.cpp.
Referenced by QuickTestUtil::printAvailableFunctions(), qtest_qParseArgs(), and quick_test_main_with_setup().
|
static |
Definition at line 60 of file qtestresult.cpp.
Referenced by QTestResult::finishedCurrentTestDataCleanup(), QTestResult::setSkipCurrentTest(), and QTestResult::skipCurrentTest().
int QTest::skips = 0 |
Definition at line 79 of file qtestlog.cpp.
Referenced by QTestLog::addSkip(), QTestLog::resetCounters(), and QTestLog::skipCount().
Q_TESTLIB_EXPORT QStringList QTest::testFunctions |
Definition at line 600 of file qtestcase.cpp.
Referenced by QuickTestResult::functionsToRun(), qRun(), qtest_qParseArgs(), and quick_test_main_with_setup().
Q_TESTLIB_EXPORT QStringList QTest::testTags |
Definition at line 601 of file qtestcase.cpp.
Referenced by QTest::TestMethods::invokeTests(), qRun(), qtest_qParseArgs(), and QuickTestResult::tagsToRun().
|
static |
Definition at line 148 of file qtestlog.cpp.
Referenced by QTestLog::setVerboseLevel(), and QTestLog::verboseLevel().