mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-02 06:38:04 +00:00
Thu Mar 5 11:44:15 CST 2009 Pekka Pessi <first.last@nokia.com>
* s2check.h: redefine tcase_add_loop_test, too Ignore-this: 149c19e8d089b60e8ddcb98da54c9d88 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12733 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
70ddbdd6d6
commit
840735200e
@ -1 +1 @@
|
|||||||
Tue Mar 24 10:30:39 CDT 2009
|
Tue Mar 24 10:31:53 CDT 2009
|
||||||
|
@ -42,10 +42,16 @@
|
|||||||
SOFIA_BEGIN_DECLS
|
SOFIA_BEGIN_DECLS
|
||||||
|
|
||||||
#undef tcase_add_test
|
#undef tcase_add_test
|
||||||
/* Redirect tcase_add_test() to our function */
|
#undef tcase_add_loop_test
|
||||||
#define tcase_add_test(tc, tf) s2_tcase_add_test(tc, tf, "" #tf "")
|
|
||||||
|
|
||||||
void s2_tcase_add_test(TCase *, TFun, char const *name);
|
/* Redirect tcase_add_test() to our function */
|
||||||
|
#define tcase_add_test(tc, tf) s2_tcase_add_test(tc, tf, "" #tf "", 0, 0, 1)
|
||||||
|
|
||||||
|
void s2_tcase_add_test(TCase *, TFun, char const *name,
|
||||||
|
int signo, int start, int end);
|
||||||
|
|
||||||
|
#define tcase_add_loop_test(tc, tf, s, e) \
|
||||||
|
s2_tcase_add_test(tc, tf, "" #tf "", 0, (s), (e))
|
||||||
|
|
||||||
void s2_select_tests(char const *pattern);
|
void s2_select_tests(char const *pattern);
|
||||||
|
|
||||||
|
@ -46,7 +46,8 @@ static char const * const *test_patterns = default_patterns;
|
|||||||
* A special version of tcase_add_test() that inserts test function into
|
* A special version of tcase_add_test() that inserts test function into
|
||||||
* tcase only if its name matches given pattern.
|
* tcase only if its name matches given pattern.
|
||||||
*/
|
*/
|
||||||
void s2_tcase_add_test(TCase *tc, TFun tf, char const *name)
|
void s2_tcase_add_test(TCase *tc, TFun tf, char const *name,
|
||||||
|
int signo, int start, int end)
|
||||||
{
|
{
|
||||||
char const * const *patterns;
|
char const * const *patterns;
|
||||||
|
|
||||||
@ -54,9 +55,9 @@ void s2_tcase_add_test(TCase *tc, TFun tf, char const *name)
|
|||||||
for (patterns = test_patterns; *patterns; patterns++) {
|
for (patterns = test_patterns; *patterns; patterns++) {
|
||||||
if (!fnmatch(*patterns, name, 0)) {
|
if (!fnmatch(*patterns, name, 0)) {
|
||||||
if (strcmp(*patterns, "*")) {
|
if (strcmp(*patterns, "*")) {
|
||||||
printf("%s: running\n", name);
|
printf("%s: selected\n", name);
|
||||||
}
|
}
|
||||||
_tcase_add_test(tc, tf, name, 0, 0, 1);
|
_tcase_add_test(tc, tf, name, signo, start, end);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -64,9 +65,9 @@ void s2_tcase_add_test(TCase *tc, TFun tf, char const *name)
|
|||||||
for (patterns = test_patterns; *patterns; patterns++) {
|
for (patterns = test_patterns; *patterns; patterns++) {
|
||||||
if (!strcmp(*patterns, name) || !strcmp(*patterns, "*")) {
|
if (!strcmp(*patterns, name) || !strcmp(*patterns, "*")) {
|
||||||
if (strcmp(*patterns, "*")) {
|
if (strcmp(*patterns, "*")) {
|
||||||
printf("%s: running\n", name);
|
printf("%s: selected\n", name);
|
||||||
}
|
}
|
||||||
_tcase_add_test(tc, tf, name, 0, 0, 1);
|
_tcase_add_test(tc, tf, name, signo, start, end);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user