Classes | |
struct | TestDescriptor |
Defines | |
#define | NULL 0 |
#define | TEST_PASSED 0 |
Status code to indicate test success. | |
#define | TEST_FAILED 1 |
Status code to indicate test failure. | |
#define | TEST_ERROR 2 |
Status code to indicate error. | |
#define | tf_fail(message) log_error("Test failed: %s (%s:%d)", message, __FILE__, __LINE__); return TEST_FAILED |
A helper macro to indicate test failure with given message. | |
#define | tf_pass() return TEST_PASSED |
A helper macro to indicate test success. | |
#define | tf_assert(expression) if (!(expression)) { log_error("Assertion '%s' failed at %s:%d", #expression, __FILE__, __LINE__); return TEST_FAILED; } |
A helper macro to check test assertion. | |
#define | tf_assert_v(expression) if (!(expression)) { log_error("Assertion '%s' failed at %s:%d", #expression, __FILE__, __LINE__); return; } |
A helper macro to check test assertion (for use in void function). | |
#define | tf_assert_message(message, expression) if (!(expression)) { log_error("Assertion '%s' failed, message: %s at %s:%d", #expression, #message, __FILE__, __LINE__); return TEST_FAILED; } |
A helper macro to check test assertion and report message in case of check failure. | |
#define | tf_assert_null(expression) tf_assert((expression)==NULL) |
A helper macro to check whether supplied expression is NULL. | |
#define | tf_assert_null_message(message, expression) tf_assert_message(message, (expression)==NULL) |
A helper macro to check whether supplied expression is NULL and report message in case of check failure. | |
#define | tf_assert_not_null(expression) tf_assert((expression)!=NULL) |
A helper macro to check whether supplied expression is not NULL. | |
#define | tf_assert_not_null_message(message, expression) tf_assert(message, (expression)!=NULL) |
A helper macro to check whether supplied expression is not NULL and report message in case of check failure. | |
#define | tf_assert_same(expected, actual) tf_assert((expected)==(actual)) |
A helper macro to compare values of two expressions. | |
#define | tf_assert_same_v(expected, actual) tf_assert_v((expected)==(actual)) |
A helper macro to compare values of two expressions (for use in void function). | |
#define | tf_assert_same_message(message, expected, actual) tf_assert_message(message, (expected)==(actual)) |
A helper macro to compare values of two expressions and report message in case of mismatch Source file name and line nimber will be appended to the message. | |
#define | TEST_LIST_START TestDescriptor testDescriptor[] = { |
Helper macro to start test list declarion. | |
#define | TEST(name) {#name , name}, |
Helper macro to include a test case into test list for execution engine. | |
#define | TEST_LIST_END {NULL, NULL}}; |
Helper macro to end test list declarion. | |
#define | LOG_LEVEL_ERROR 0 |
Defines error-only log level. | |
#define | LOG_LEVEL_INFO 1 |
Defines error and info only log level. | |
#define | LOG_LEVEL_DEBUG 2 |
Defines debug log level. | |
Functions | |
void | setup () |
Setup function for test case. | |
void | teardown () |
Clean up function for test case. | |
int | default_main (int argc, char *argv[]) |
Engin for running test case. | |
void | log_error (char *format,...) |
logs error, arguments are the same as for printf() prints to standard error | |
void | log_info (char *format,...) |
logs message, arguments are the same as for printf() prints to standard output | |
void | log_debug (char *format,...) |
logs message, arguments are the same as for printf() prints to standard output | |
void | log_set_level (int level) |
Sets logging level. | |
Variables | |
TestDescriptor | testDescriptor [] |
#define NULL 0 |
Genereated on Tue Mar 11 19:26:09 2008 by Doxygen.
(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.