Commit a898e8a5 authored by Pekka Pessi's avatar Pekka Pessi

s2base.h: added S2_CASE(), added test function name to s2_case() parameters

Ignore-this: c9ceff2812044e2643c21548be29233e

darcs-hash:20090305182930-db55f-564caca69e81777fe9961daa413e5231fd78c8cf.gz
parent 7205032d
......@@ -126,13 +126,15 @@ void s2_setup(char const *label)
void s2_case(char const *number,
char const *title,
char const *description)
char const *description,
char const *function)
{
stamps.start = now();
_s2_case = number;
if (s2_start_stop)
printf("%s - starting %s/%s-%s\n", s2_tester, _s2_suite, _s2_case, title);
printf("%s - starting %s (%s/%s %s)\n", s2_tester, function,
_s2_suite, _s2_case, title);
}
void s2_step(void)
......
......@@ -44,7 +44,16 @@ void s2_step(void);
void s2_case(char const *tag,
char const *title,
char const *description);
char const *description,
char const *function);
#if HAVE_FUNC
#define S2_CASE(n, t, d) s2_case((n),(t),(d), __func__)
#elif HAVE_FUNCTION
#define S2_CASE(n, t, d) s2_case((n),(t),(d), __FUNCTION__)
#else
#define S2_CASE(n, t, d) s2_case((n),(t),(d), "")
#endif
void s2_teardown_started(char const *label);
void s2_teardown(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment