Defines | |||
![]() | ![]() | #define | T_CTEST_EXPORT |
![]() | ![]() | #define | T_CTEST_IMPORT |
![]() | ![]() | #define | C_CTEST_API |
![]() | ![]() | #define | T_CTEST_API |
![]() | ![]() | #define | T_CTEST_EXPORT_API |
![]() | ![]() | #define | FALSE |
![]() | ![]() | #define | TRUE |
Typedefs | |||
![]() | ![]() | typedef void (* | TestFunctionPtr )() |
![]() | ![]() | typedef struct TestNode | TestNode |
Functions | |||
![]() | ![]() | T_CTEST_API void | showTests ( const TestNode *root) |
![]() | ![]() | Show the names of all nodes. More... | |
![]() | ![]() | T_CTEST_API void | runTests ( const TestNode* root) |
![]() | ![]() | Run a subtree of tests. More... | |
![]() | ![]() | T_CTEST_API void | addTest ( TestNode** root, TestFunctionPtr test, const char *path) |
![]() | ![]() | Add a test to the subtree. More... | |
![]() | ![]() | T_CTEST_API const TestNode* | getTest (const TestNode* root, const char *path) |
![]() | ![]() | Retreive a specific subtest. More... | |
![]() | ![]() | T_CTEST_API void | log_err (const char* pattern, ...) |
![]() | ![]() | Log an error message. More... | |
![]() | ![]() | T_CTEST_API void | log_info (const char* pattern, ...) |
![]() | ![]() | Log an informational message. More... | |
![]() | ![]() | T_CTEST_API void | log_verbose (const char* pattern, ...) |
![]() | ![]() | Log a verbose informational message. More... | |
![]() | ![]() | T_CTEST_API int | processArgs (const TestNode* root, int argc, const char** argv) |
![]() | ![]() | Processes the command line arguments. More... | |
Variables | |||
![]() | ![]() | T_CTEST_EXPORT_API int | ERROR_COUNT |
![]() | ![]() | Count of errors from all tests. More... | |
![]() | ![]() | T_CTEST_EXPORT_API int | VERBOSITY |
![]() | ![]() | Set this to zero to disable log_verbose() messages. More... | |
![]() | ![]() | T_CTEST_EXPORT_API int | ERR_MSG |
![]() | ![]() | Set this to zero to disable log_verbose() messages. More... |
#define T_CTEST_EXPORT () |
#define T_CTEST_IMPORT () |
#define C_CTEST_API () |
#define T_CTEST_API () |
#define T_CTEST_EXPORT_API () |
#define FALSE () |
#define TRUE () |
typedef void (* TestFunctionPtr)() |
typedef struct TestNode TestNode |
T_CTEST_API void showTests (const TestNode * root) |
Show the names of all nodes.
root | Subtree of tests. |
T_CTEST_API void runTests (const TestNode * root) |
Run a subtree of tests.
root | Subtree of tests. |
T_CTEST_API void addTest (TestNode ** root, TestFunctionPtr test, const char * path) |
Add a test to the subtree.
Example usage:
TestNode* root=NULL; addTest(&root, &mytest, "/a/b/mytest" );
root | Pointer to the root pointer. |
test | Pointer to 'void function(void)' for actual test. |
path | Path from root under which test will be placed. Ex. '/a/b/mytest' |
T_CTEST_API const TestNode * getTest (const TestNode * root, const char * path) |
Retreive a specific subtest.
(subtree).
root | Pointer to the root. |
path | Path relative to the root, Ex. '/a/b' |
T_CTEST_API void log_err (const char * pattern, ...) |
Log an error message.
(printf style)
pattern | printf-style format string |
T_CTEST_API void log_info (const char * pattern, ...) |
Log an informational message.
(printf style)
pattern | printf-style format string |
T_CTEST_API void log_verbose (const char * pattern, ...) |
Log a verbose informational message.
(printf style) This message will only appear if the global VERBOSITY is nonzero
pattern | printf-style format string |
T_CTEST_API int processArgs (const TestNode * root, int argc, const char ** argv) |
Processes the command line arguments.
This is a sample implementation
Usage: %s [ -l ] [ -v ] [ -? ] [ /path/to/test ] -l List only, do not run\ -v turn OFF verbosity -? print this message
root | Testnode root with tests already attached to it |
argv | argument list from main (stdio.h) |
argc | argument list count from main (stdio.h) |
T_CTEST_EXPORT_API int ERROR_COUNT |
Count of errors from all tests.
May be reset.
T_CTEST_EXPORT_API int VERBOSITY |
Set this to zero to disable log_verbose() messages.
Otherwise nonzero to see log_verbose() messages.
T_CTEST_EXPORT_API int ERR_MSG |
Set this to zero to disable log_verbose() messages.
Otherwise nonzero to see log_verbose() messages.