![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
Functions | |
CTK_CORE_EXPORT bool | CheckInt (int line, const QString &description, int current, int expected) |
CTK_CORE_EXPORT bool | CheckNotNull (int line, const QString &description, const void *pointer) |
CTK_CORE_EXPORT bool | CheckNull (int line, const QString &description, const void *pointer) |
CTK_CORE_EXPORT bool | CheckPointer (int line, const QString &description, void *current, void *expected, bool errorIfDifferent=true) |
CTK_CORE_EXPORT bool | CheckString (int line, const QString &description, const char *current, const char *expected, bool errorIfDifferent=true) |
CTK_CORE_EXPORT bool | CheckStringList (int line, const QString &description, const QStringList ¤t, const QStringList &expected) |
CTK_CORE_EXPORT bool | CheckVariant (int line, const QString &description, const QVariant ¤t, const QVariant &expected) |
This module provides functions to facilitate writing tests.
Before using this module, first consider the QTestLib unit testing framework available in Qt.
Example:
Usually these test methods are used by single-line convenience macros defined in ctkCoreTestingMacros.h.
CTK_CORE_EXPORT bool ctkCoreTestingUtilities::CheckInt | ( | int | line, |
const QString & | description, | ||
int | current, | ||
int | expected | ||
) |
CTK_CORE_EXPORT bool ctkCoreTestingUtilities::CheckNotNull | ( | int | line, |
const QString & | description, | ||
const void * | pointer | ||
) |
CTK_CORE_EXPORT bool ctkCoreTestingUtilities::CheckNull | ( | int | line, |
const QString & | description, | ||
const void * | pointer | ||
) |
CTK_CORE_EXPORT bool ctkCoreTestingUtilities::CheckPointer | ( | int | line, |
const QString & | description, | ||
void * | current, | ||
void * | expected, | ||
bool | errorIfDifferent = true |
||
) |
CTK_CORE_EXPORT bool ctkCoreTestingUtilities::CheckString | ( | int | line, |
const QString & | description, | ||
const char * | current, | ||
const char * | expected, | ||
bool | errorIfDifferent = true |
||
) |
CTK_CORE_EXPORT bool ctkCoreTestingUtilities::CheckStringList | ( | int | line, |
const QString & | description, | ||
const QStringList & | current, | ||
const QStringList & | expected | ||
) |
CTK_CORE_EXPORT bool ctkCoreTestingUtilities::CheckVariant | ( | int | line, |
const QString & | description, | ||
const QVariant & | current, | ||
const QVariant & | expected | ||
) |