Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QTest::Internal Namespace Reference

Classes

struct  Compare
 
struct  Compare< ComparisonOperation::Equal >
 
struct  Compare< ComparisonOperation::GreaterThan >
 
struct  Compare< ComparisonOperation::GreaterThanOrEqual >
 
struct  Compare< ComparisonOperation::LessThan >
 
struct  Compare< ComparisonOperation::LessThanOrEqual >
 
struct  Compare< ComparisonOperation::NotEqual >
 
class  HasInitMain
 
struct  QCborValueFormatter
 

Typedefs

template<typename T >
using is_suitable_type_v
 

Functions

template<typename T >
std::enable_if< HasInitMain< T >::value, void >::type callInitMain ()
 
template<typename T >
std::enable_if<!HasInitMain< T >::value, void >::type callInitMain ()
 
const char * toString (QSizePolicy::Policy p)
 
QByteArray toString (QSizePolicy::ControlTypes ct)
 
QByteArray toString (QSizePolicy sp)
 
Q_TESTLIB_EXPORT void throwOnFail ()
 
Q_TESTLIB_EXPORT void throwOnSkip ()
 
Q_TESTLIB_EXPORT void maybeThrowOnFail ()
 
Q_TESTLIB_EXPORT void maybeThrowOnSkip ()
 
Q_TESTLIB_EXPORT QString formatTryTimeoutDebugMessage (q_no_char8_t::QUtf8StringView expr, int timeout, int actual)
 
template<typename T1 >
const char * genericToString (const void *arg)
 
template<>
const char * genericToString< char * > (const void *arg)
 
template<typename T >
const char * pointerToString (const void *arg)
 
template<typename T >
std::enable_if< QtPrivate::IsQEnumHelper< T >::Value, char * >::type toString (T e)
 
template<typename T >
std::enable_if<!QtPrivate::IsQEnumHelper< T >::Value &&std::is_enum_v< T >, char * >::type toString (const T &e)
 
template<typename T >
std::enable_if<!QtPrivate::IsQEnumHelper< T >::Value &&!std::is_enum_v< T >, char * >::type toString (const T &t)
 
template<typename F >
std::enable_if< QtPrivate::IsQEnumHelper< F >::Value, char * >::type toString (QFlags< F > f)
 
template<typename F >
std::enable_if<!QtPrivate::IsQEnumHelper< F >::Value, char * >::type toString (QFlags< F > f)
 

Variables

bool noCrashHandler = false
 
static bool failed = false
 
template<typename T >
constexpr bool is_suitable_type_helper_v
 

Detailed Description

Typedef Documentation

◆ is_suitable_type_v

template<typename T >
using QTest::Internal::is_suitable_type_v
Initial value:
std::enable_if_t<!(std::is_pointer_v<T>
std::remove_const_t<std::remove_pointer_t<T>>>),
bool>
constexpr bool is_suitable_type_helper_v

Definition at line 89 of file qtesttostring.h.

Function Documentation

◆ callInitMain() [1/2]

template<typename T >
std::enable_if< HasInitMain< T >::value, void >::type QTest::Internal::callInitMain ( )

Definition at line 196 of file qtest.h.

◆ callInitMain() [2/2]

template<typename T >
std::enable_if<!HasInitMain< T >::value, void >::type QTest::Internal::callInitMain ( )

Definition at line 202 of file qtest.h.

◆ formatTryTimeoutDebugMessage()

QString QTest::Internal::formatTryTimeoutDebugMessage ( q_no_char8_t::QUtf8StringView expr,
int timeout,
int actual )

Definition at line 357 of file qtestcase.cpp.

References QString::number().

+ Here is the call graph for this function:

◆ genericToString()

template<typename T1 >
const char * QTest::Internal::genericToString ( const void * arg)

Definition at line 352 of file qtestcase.h.

References arg, QTest::toString(), and toString().

Referenced by QTest::qCompare(), and QTest::qCompareOp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ genericToString< char * >()

template<>
const char * QTest::Internal::genericToString< char * > ( const void * arg)
inline

Definition at line 358 of file qtestcase.h.

References arg, QTest::toString(), and toString().

+ Here is the call graph for this function:

◆ maybeThrowOnFail()

void QTest::Internal::maybeThrowOnFail ( )

Definition at line 201 of file qtestcase.cpp.

References QTest::g_throwOnFail, and throwOnFail().

+ Here is the call graph for this function:

◆ maybeThrowOnSkip()

void QTest::Internal::maybeThrowOnSkip ( )

Definition at line 207 of file qtestcase.cpp.

References QTest::g_throwOnSkip, and throwOnSkip().

+ Here is the call graph for this function:

◆ pointerToString()

template<typename T >
const char * QTest::Internal::pointerToString ( const void * arg)

Definition at line 364 of file qtestcase.h.

References arg, QTest::toString(), and toString().

+ Here is the call graph for this function:

◆ throwOnFail()

void QTest::Internal::throwOnFail ( )

Definition at line 195 of file qtestcase.cpp.

Referenced by maybeThrowOnFail().

+ Here is the caller graph for this function:

◆ throwOnSkip()

void QTest::Internal::throwOnSkip ( )

Definition at line 196 of file qtestcase.cpp.

Referenced by maybeThrowOnSkip().

+ Here is the caller graph for this function:

◆ toString() [1/8]

template<typename T >
std::enable_if<!QtPrivate::IsQEnumHelper< T >::Value &&std::is_enum_v< T >, char * >::type QTest::Internal::toString ( const T & e)
inline

Definition at line 45 of file qtesttostring.h.

References QByteArray::number(), and qstrdup().

+ Here is the call graph for this function:

◆ toString() [2/8]

template<typename T >
std::enable_if<!QtPrivate::IsQEnumHelper< T >::Value &&!std::is_enum_v< T >, char * >::type QTest::Internal::toString ( const T & t)
inline

Definition at line 51 of file qtesttostring.h.

References qstrdup().

+ Here is the call graph for this function:

◆ toString() [3/8]

template<typename F >
std::enable_if< QtPrivate::IsQEnumHelper< F >::Value, char * >::type QTest::Internal::toString ( QFlags< F > f)
inline

Definition at line 67 of file qtesttostring.h.

References QByteArray::constData(), qstrdup(), and QMetaEnum::valueToKeys().

+ Here is the call graph for this function:

◆ toString() [4/8]

template<typename F >
std::enable_if<!QtPrivate::IsQEnumHelper< F >::Value, char * >::type QTest::Internal::toString ( QFlags< F > f)
inline

Definition at line 74 of file qtesttostring.h.

References qsnprintf().

+ Here is the call graph for this function:

◆ toString() [5/8]

QByteArray QTest::Internal::toString ( QSizePolicy sp)
inline

Definition at line 49 of file qtest_widgets.h.

References QByteArray::number(), QByteArray(), sp, and toString().

+ Here is the call graph for this function:

◆ toString() [6/8]

QByteArray QTest::Internal::toString ( QSizePolicy::ControlTypes ct)
inline

Definition at line 43 of file qtest_widgets.h.

References QMetaEnum::valueToKeys().

+ Here is the call graph for this function:

◆ toString() [7/8]

const char * QTest::Internal::toString ( QSizePolicy::Policy p)
inline

Definition at line 37 of file qtest_widgets.h.

References QMetaEnum::valueToKey().

Referenced by genericToString(), genericToString< char * >(), pointerToString(), QTest::toString(), toString(), toString(), toString(), and toString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toString() [8/8]

template<typename T >
std::enable_if< QtPrivate::IsQEnumHelper< T >::Value, char * >::type QTest::Internal::toString ( T e)
inline

Definition at line 38 of file qtesttostring.h.

References qstrdup(), and QMetaEnum::valueToKey().

+ Here is the call graph for this function:

Variable Documentation

◆ failed

bool QTest::Internal::failed = false
static

Definition at line 26 of file qtestresult.cpp.

Referenced by QTest::hasFailed(), and QTest::setFailed().

◆ is_suitable_type_helper_v

template<typename T >
constexpr bool QTest::Internal::is_suitable_type_helper_v
constexpr
Initial value:
= std::disjunction_v<std::is_same<T, char>,
std::is_same<T, void>,
std::is_same<T, QObject>
>

Definition at line 83 of file qtesttostring.h.

◆ noCrashHandler

Q_TESTLIB_EXPORT bool QTest::Internal::noCrashHandler = false

Definition at line 440 of file qtestcase.cpp.

Referenced by QTest::qtest_qParseArgs(), and quick_test_main_with_setup().