Main Page   Compound List   File List   Header Files   Sources   Compound Members   File Members  

ctest.h File Reference


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 void cleanUpTestTree (TestNode *tn)
T_CTEST_API const TestNodegetTest (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 Documentation

#define T_CTEST_EXPORT ()

Definition at line 20 of file ctest.h.

#define T_CTEST_IMPORT ()

Definition at line 21 of file ctest.h.

#define C_CTEST_API ()

Definition at line 27 of file ctest.h.

#define T_CTEST_API ()

Definition at line 34 of file ctest.h.

#define T_CTEST_EXPORT_API ()

Definition at line 35 of file ctest.h.

#define FALSE ()

Definition at line 43 of file ctest.h.

#define TRUE ()

Definition at line 46 of file ctest.h.


Typedef Documentation

typedef void (* TestFunctionPtr)()

Definition at line 54 of file ctest.h.

typedef struct TestNode TestNode

Definition at line 55 of file ctest.h.


Function Documentation

T_CTEST_API void showTests (const TestNode * root)

Show the names of all nodes.

Parameters:
root   Subtree of tests.

WARNING! This is not a part of API and is not maintained. DO NOT USE! Internal APIs for testing purpose only

T_CTEST_API void runTests (const TestNode * root)

Run a subtree of tests.

Parameters:
root   Subtree of tests.

WARNING! This is not a part of API and is not maintained. DO NOT USE! Internal APIs for testing purpose only

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" );
 
Parameters:
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'

WARNING! This is not a part of API and is not maintained. DO NOT USE! Internal APIs for testing purpose only

T_CTEST_API void cleanUpTestTree (TestNode * tn)

T_CTEST_API const TestNode * getTest (const TestNode * root, const char * path)

Retreive a specific subtest.

(subtree).

Parameters:
root   Pointer to the root.
path   Path relative to the root, Ex. '/a/b'
Returns:
The subtest, or NULL on failure.

WARNING! This is not a part of API and is not maintained. DO NOT USE! Internal APIs for testing purpose only

T_CTEST_API void log_err (const char * pattern, ...)

Log an error message.

(printf style)

Parameters:
pattern   printf-style format string

WARNING! This is not a part of API and is not maintained. DO NOT USE! Internal APIs for testing purpose only

T_CTEST_API void log_info (const char * pattern, ...)

Log an informational message.

(printf style)

Parameters:
pattern   printf-style format string

WARNING! This is not a part of API and is not maintained. DO NOT USE! Internal APIs for testing purpose only

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

Parameters:
pattern   printf-style format string

WARNING! This is not a part of API and is not maintained. DO NOT USE! Internal APIs for testing purpose only

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
Parameters:
root   Testnode root with tests already attached to it
argv   argument list from main (stdio.h)
argc   argument list count from main (stdio.h)
Returns:
positive for error count, 0 for success, negative for illegal argument

WARNING! This is not a part of API and is not maintained. DO NOT USE! Internal APIs for testing purpose only


Variable Documentation

T_CTEST_EXPORT_API int ERROR_COUNT

Count of errors from all tests.

May be reset.

WARNING! This is not a part of API and is not maintained. DO NOT USE! Internal APIs for testing purpose only

Definition at line 62 of file ctest.h.

T_CTEST_EXPORT_API int VERBOSITY

Set this to zero to disable log_verbose() messages.

Otherwise nonzero to see log_verbose() messages.

WARNING! This is not a part of API and is not maintained. DO NOT USE! Internal APIs for testing purpose only

Definition at line 70 of file ctest.h.

T_CTEST_EXPORT_API int ERR_MSG

Set this to zero to disable log_verbose() messages.

Otherwise nonzero to see log_verbose() messages.

WARNING! This is not a part of API and is not maintained. DO NOT USE! Internal APIs for testing purpose only

Definition at line 78 of file ctest.h.


Generated at Wed Aug 16 16:06:06 2000 for ICU1.5UnsupportedAPI by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999