42 #ifndef QTESTRESULT_P_H 43 #define QTESTRESULT_P_H 56 #include <QtTest/qtest_global.h> 60 class QTestResultPrivate;
66 enum TestLocation { NoWhere = 0, DataFunc = 1, InitFunc = 2, Func = 3, CleanupFunc = 4 };
70 static bool allDataPassed();
76 static const char *currentGlobalDataTag();
77 static void finishedCurrentTestFunction();
80 static int passCount();
81 static int failCount();
82 static int skipCount();
86 static void addFailure(
const char *message,
const char *file,
int line);
87 static bool compare(
bool success,
const char *msg,
const char *file,
int line);
88 static bool compare(
bool success,
const char *msg,
char *val1,
char *val2,
89 const char *actual,
const char *expected,
const char *file,
int line);
92 static void setCurrentTestData(
QTestData *data);
93 static void setCurrentTestFunction(
const char *func);
95 static void setCurrentTestObject(
const char *
name);
97 const char *file,
int line);
98 static bool expectFail(
const char *dataIndex,
const char *comment,
100 static bool verify(
bool statement,
const char *statementStr,
const char *extraInfo,
101 const char *file,
int line);
102 static bool testFailed();
103 static void setSkipCurrentTest(
bool value);
106 static void setCurrentAppName(
const char *
appName);
#define QT_END_NAMESPACE
This macro expands to.
static const char * currentAppName
Q_TESTLIB_EXPORT const char * currentTestFunction()
Returns the name of the test function that is currently executed.
Q_TESTLIB_EXPORT void ignoreMessage(QtMsgType type, const char *message)
Ignores messages created by qDebug() or qWarning().
SkipMode
This enum describes the modes for skipping tests during execution of the test data.
static bool skipCurrentTest
Q_CORE_EXPORT QTextStream & reset(QTextStream &s)
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
QtMsgType
This enum describes the messages that can be sent to a message handler (QtMsgHandler).
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool compare(const QVariant::Private *a, const QVariant::Private *b)
Compares a to b.
static const char * data(const QByteArray &arr)
Q_TESTLIB_EXPORT const char * currentDataTag()
Returns the name of the current test data.
TestFailMode
This enum describes the modes for handling an expected failure of the QVERIFY() or QCOMPARE() macros...
static QTestData * currentTestData
Q_TESTLIB_EXPORT bool currentTestFailed()
Returns true if the current test function failed, otherwise false.
static const char * currentTestObjectName
static QTestData * currentGlobalTestData