-Tester improved (used time is displayed)

This commit is contained in:
Jan Hutter
2005-11-04 07:51:00 +00:00
parent f890ca3b7d
commit 66dae4501e
4 changed files with 74 additions and 10 deletions
+28 -3
View File
@@ -58,16 +58,32 @@ struct tester_s {
status_t (*test_all) (tester_t *tester,test_t **tests);
/**
* @brief is called in a testcase to check a specific situation
* @brief is called in a testcase to check a specific situation for TRUE
*
* Log-Values to the tester output are protected from multiple access
*
* @warning this function should only be called in a test_function
*
* @param this tester object
* @param to_be_true assert which has to be true
* @param to_be_true assert which has to be TRUE
* @param Name of the assertion
*/
void (*assert_true) (tester_t *tester, bool to_be_true, char *assert_name);
/**
* @brief is called in a testcase to check a specific situation for FALSE
*
* Log-Values to the tester output are protected from multiple access
*
* @warning this function should only be called in a test_function
*
* @param this tester object
* @param to_be_false assert which has to be FALSE
* @param Name of the assertion
*/
void (*assert_false) (tester_t *tester, bool to_be_false, char *assert_name);
/**
* @brief run a specific test case
*
@@ -87,6 +103,15 @@ struct tester_s {
status_t (*destroy) (tester_t *tester);
};
tester_t *tester_create(FILE *output);
/**
* @brief creates a tester object needed to perform tests
*
* @param output test output is written to this output
* @param display_succeeded_asserts has to be TRUE, if all asserts should be displayed,
* else otherwise
*
* @return tester object
*/
tester_t *tester_create(FILE *output, bool display_succeeded_asserts);
#endif /*TESTER_H_*/