#include <qtestresult_p.h>
|
static void | addFailure (const char *message, const char *file, int line) |
|
static void | addSkip (const char *message, QTest::SkipMode mode, const char *file, int line) |
|
static bool | allDataPassed () |
|
static bool | compare (bool success, const char *msg, const char *file, int line) |
|
static bool | compare (bool success, const char *msg, char *val1, char *val2, const char *actual, const char *expected, const char *file, int line) |
|
static const char * | currentAppName () |
|
static const char * | currentDataTag () |
|
static const char * | currentGlobalDataTag () |
|
static QTestData * | currentGlobalTestData () |
|
static QTestData * | currentTestData () |
|
static bool | currentTestFailed () |
|
static const char * | currentTestFunction () |
|
static TestLocation | currentTestLocation () |
|
static const char * | currentTestObjectName () |
|
static bool | expectFail (const char *dataIndex, const char *comment, QTest::TestFailMode mode, const char *file, int line) |
|
static int | failCount () |
|
static void | finishedCurrentTestFunction () |
|
static void | ignoreMessage (QtMsgType type, const char *msg) |
|
static int | passCount () |
|
static void | reset () |
|
static void | setCurrentAppName (const char *appName) |
|
static void | setCurrentGlobalTestData (QTestData *data) |
|
static void | setCurrentTestData (QTestData *data) |
|
static void | setCurrentTestFunction (const char *func) |
|
static void | setCurrentTestLocation (TestLocation loc) |
|
static void | setCurrentTestObject (const char *name) |
|
static void | setSkipCurrentTest (bool value) |
|
static int | skipCount () |
|
static bool | skipCurrentTest () |
|
static bool | testFailed () |
|
static bool | verify (bool statement, const char *statementStr, const char *extraInfo, const char *file, int line) |
|
Definition at line 63 of file qtestresult_p.h.
◆ TestLocation
Enumerator |
---|
NoWhere | |
DataFunc | |
InitFunc | |
Func | |
CleanupFunc | |
Definition at line 66 of file qtestresult_p.h.
◆ addFailure()
void QTestResult::addFailure |
( |
const char * |
message, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
|
static |
◆ addSkip()
void QTestResult::addSkip |
( |
const char * |
message, |
|
|
QTest::SkipMode |
mode, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
|
static |
Definition at line 290 of file qtestresult.cpp.
Referenced by QTest::qSkip().
static void addSkip(const char *msg, QTest::SkipMode mode, const char *file, int line)
static void clearExpectFail()
◆ allDataPassed()
bool QTestResult::allDataPassed |
( |
| ) |
|
|
static |
◆ compare() [1/2]
bool QTestResult::compare |
( |
bool |
success, |
|
|
const char * |
msg, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
|
static |
Definition at line 253 of file qtestresult.cpp.
Referenced by QTest::compare_helper().
static int verboseLevel()
static bool checkStatement(bool statement, const char *msg, const char *file, int line)
static void info(const char *msg, const char *file, int line)
◆ compare() [2/2]
bool QTestResult::compare |
( |
bool |
success, |
|
|
const char * |
msg, |
|
|
char * |
val1, |
|
|
char * |
val2, |
|
|
const char * |
actual, |
|
|
const char * |
expected, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
|
static |
Definition at line 262 of file qtestresult.cpp.
269 return compare(success, msg, file, line);
273 actual, val1 ? val1 :
"<null>",
274 expected, val2 ? val2 :
"<null>");
277 return compare(success, buf, file, line);
static bool compare(bool success, const char *msg, const char *file, int line)
int Q_TESTLIB_EXPORT qt_snprintf(char *str, int size, const char *format,...)
#define QTEST_ASSERT(cond)
◆ currentAppName()
const char * QTestResult::currentAppName |
( |
| ) |
|
|
static |
◆ currentDataTag()
const char * QTestResult::currentDataTag |
( |
| ) |
|
|
static |
◆ currentGlobalDataTag()
const char * QTestResult::currentGlobalDataTag |
( |
| ) |
|
|
static |
◆ currentGlobalTestData()
QTestData * QTestResult::currentGlobalTestData |
( |
| ) |
|
|
static |
◆ currentTestData()
◆ currentTestFailed()
bool QTestResult::currentTestFailed |
( |
| ) |
|
|
static |
◆ currentTestFunction()
const char * QTestResult::currentTestFunction |
( |
| ) |
|
|
static |
◆ currentTestLocation()
◆ currentTestObjectName()
const char * QTestResult::currentTestObjectName |
( |
| ) |
|
|
static |
◆ expectFail()
bool QTestResult::expectFail |
( |
const char * |
dataIndex, |
|
|
const char * |
comment, |
|
|
QTest::TestFailMode |
mode, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
|
static |
Definition at line 190 of file qtestresult.cpp.
Referenced by QTest::qExpectFail().
204 addFailure(
"Already expecting a fail", file, line);
static void addFailure(const char *message, const char *file, int line)
static int expectFailMode
static void clearExpectFail()
static bool isExpectFailData(const char *dataIndex)
#define QTEST_ASSERT(cond)
static const char * expectFailComment
◆ failCount()
int QTestResult::failCount |
( |
| ) |
|
|
static |
◆ finishedCurrentTestFunction()
void QTestResult::finishedCurrentTestFunction |
( |
| ) |
|
|
static |
Definition at line 141 of file qtestresult.cpp.
Referenced by QTest::qExec(), QTest::qInvokeTestMethod(), and QTest::qInvokeTestMethods().
145 addFailure(
"Not all expected messages were received", 0, 0);
static void addPass(const char *msg)
static bool skipCurrentTest
static const char * currentTestFunc
static void addFailure(const char *message, const char *file, int line)
static int unhandledIgnoreMessages()
static void printUnhandledIgnoreMessages()
static void clearExpectFail()
static QTestResult::TestLocation location
static void leaveTestFunction()
◆ ignoreMessage()
void QTestResult::ignoreMessage |
( |
QtMsgType |
type, |
|
|
const char * |
msg |
|
) |
| |
|
static |
◆ passCount()
int QTestResult::passCount |
( |
| ) |
|
|
static |
◆ reset()
void QTestResult::reset |
( |
| ) |
|
|
static |
Definition at line 75 of file qtestresult.cpp.
Referenced by QTest::qExec().
static const char * currentTestFunc
static int expectFailMode
static QTestResult::TestLocation location
static QTestData * currentTestData
static const char * expectFailComment
static const char * currentTestObjectName
static QTestData * currentGlobalTestData
◆ setCurrentAppName()
void QTestResult::setCurrentAppName |
( |
const char * |
appName | ) |
|
|
static |
◆ setCurrentGlobalTestData()
void QTestResult::setCurrentGlobalTestData |
( |
QTestData * |
data | ) |
|
|
static |
◆ setCurrentTestData()
void QTestResult::setCurrentTestData |
( |
QTestData * |
data | ) |
|
|
static |
◆ setCurrentTestFunction()
void QTestResult::setCurrentTestFunction |
( |
const char * |
func | ) |
|
|
static |
◆ setCurrentTestLocation()
void QTestResult::setCurrentTestLocation |
( |
TestLocation |
loc | ) |
|
|
static |
◆ setCurrentTestObject()
void QTestResult::setCurrentTestObject |
( |
const char * |
name | ) |
|
|
static |
◆ setSkipCurrentTest()
void QTestResult::setSkipCurrentTest |
( |
bool |
value | ) |
|
|
static |
◆ skipCount()
int QTestResult::skipCount |
( |
| ) |
|
|
static |
◆ skipCurrentTest()
bool QTestResult::skipCurrentTest |
( |
| ) |
|
|
static |
◆ testFailed()
bool QTestResult::testFailed |
( |
| ) |
|
|
static |
◆ verify()
bool QTestResult::verify |
( |
bool |
statement, |
|
|
const char * |
statementStr, |
|
|
const char * |
extraInfo, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
|
static |
Definition at line 238 of file qtestresult.cpp.
Referenced by QTest::qVerify().
248 QTest::qt_snprintf(msg, 1024,
"'%s' returned FALSE. (%s)", statementStr, description);
static int verboseLevel()
int Q_TESTLIB_EXPORT qt_snprintf(char *str, int size, const char *format,...)
static bool checkStatement(bool statement, const char *msg, const char *file, int line)
static void info(const char *msg, const char *file, int line)
The documentation for this class was generated from the following files: