/**
* Run a single test case with fixtures
*/
-static bool run_case(test_case_t *tcase, test_runner_init_t init, char *cfg)
+static bool run_case(test_case_t *tcase, test_runner_init_t init, char *cfg,
+ level_t level)
{
enumerator_t *enumerator;
test_function_t *tfun;
bool ok = FALSE;
int leaks = 0;
+ if (level >= 0)
+ {
+ fprintf(stderr, "\nRunning function '%s' [%d]:\n",
+ tfun->name, i);
+ }
+
test_setup_timeout(tcase->timeout);
start_timing(&start);
/**
* Run a single test suite
*/
-static bool run_suite(test_suite_t *suite, test_runner_init_t init, char *cfg)
+static bool run_suite(test_suite_t *suite, test_runner_init_t init, char *cfg,
+ level_t level)
{
enumerator_t *enumerator;
test_case_t *tcase;
enumerator = array_create_enumerator(suite->tcases);
while (enumerator->enumerate(enumerator, &tcase))
{
- if (run_case(tcase, init, cfg))
+ if (run_case(tcase, init, cfg, level))
{
passed++;
}
enumerator = array_create_enumerator(suites);
while (enumerator->enumerate(enumerator, &suite))
{
- if (run_suite(suite, init, cfg))
+ if (run_suite(suite, init, cfg, level))
{
passed++;
}