Tue Feb 10 07:18:22 CST 2009 Pekka Pessi <first.last@nokia.com>
* s2check: fixed s2_tcase_add_test() git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11876 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
7441387d86
commit
441f043162
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue