Commit c2c58a92 authored by Pekka Pessi's avatar Pekka Pessi

s2check: fixed s2_tcase_add_test()

Ignore-this: 430b25b2dd5f52624da2d8d8a334d123

darcs-hash:20090210131822-db55f-0bdeea4741eeece1af1931355320b82925828b46.gz
parent 6d329676
......@@ -33,6 +33,10 @@
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*/
#ifndef SU_CONFIG_H
#include <sofia-sip/su_config.h>
#endif
#include <check.h>
SOFIA_BEGIN_DECLS
......@@ -43,8 +47,6 @@ SOFIA_BEGIN_DECLS
void s2_tcase_add_test(TCase *, TFun, char const *name);
SOFIA_END_DECLS
#endif /* S2CHECK_H */
......@@ -26,6 +26,13 @@
#if HAVE_CHECK
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <check.h>
#if HAVE_FNMATCH_H
#include <fnmatch.h>
#endif
......@@ -33,8 +40,6 @@
static char const * const default_patterns[] = { "*", NULL };
static char const * const *test_patterns = default_patterns;
#undef tcase_add_test
/** tcase_add_test() replacement.
*
* A special version of tcase_add_test() that inserts test function into
......@@ -50,7 +55,7 @@ void s2_tcase_add_test(TCase *tc, TFun tf, char const *name)
if (strcmp(*patterns, "*")) {
printf("%s: running\n", name);
}
tcase_add_test(tc, tf, name, 0, 0, 1);
_tcase_add_test(tc, tf, name, 0, 0, 1);
return;
}
}
......@@ -60,7 +65,7 @@ void s2_tcase_add_test(TCase *tc, TFun tf, char const *name)
if (strcmp(*patterns, "*")) {
printf("%s: running\n", name);
}
tcase_add_test(tc, tf, name, 0, 0, 1);
_tcase_add_test(tc, tf, name, 0, 0, 1);
return;
}
}
......
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