check: remove some cruft from header file

Remove some cruft from the gstcheck header file that's not needed
any longer now that we ship with our own copy of libcheck.
This commit is contained in:
Tim-Philipp Müller 2010-01-10 17:39:55 +00:00
parent 045b66caca
commit 5a12d1efa5

View file

@ -38,12 +38,6 @@ G_BEGIN_DECLS
GST_DEBUG_CATEGORY_EXTERN (check_debug); GST_DEBUG_CATEGORY_EXTERN (check_debug);
#define GST_CAT_DEFAULT check_debug #define GST_CAT_DEFAULT check_debug
#define __CHECK_VERSION_LATER_THAN(major,minor,micro) \
(CHECK_MAJOR_VERSION > major || \
(CHECK_MAJOR_VERSION == (major) && CHECK_MINOR_VERSION > (minor)) || \
(CHECK_MAJOR_VERSION == (major) && CHECK_MINOR_VERSION == (minor) && \
CHECK_MICRO_VERSION > (micro)))
/* logging function for tests /* logging function for tests
* a test uses g_message() to log a debug line * a test uses g_message() to log a debug line
* a gst unit test can be run with GST_TEST_DEBUG env var set to see the * a gst unit test can be run with GST_TEST_DEBUG env var set to see the
@ -114,7 +108,6 @@ gst_check_message_error (msg, GST_MESSAGE_ERROR, \
* *
* wrapper for checks END_TEST * wrapper for checks END_TEST
*/ */
#if __CHECK_VERSION_LATER_THAN(0,9,3)
#define GST_START_TEST(__testname) \ #define GST_START_TEST(__testname) \
static void __testname (int __i__)\ static void __testname (int __i__)\
{\ {\
@ -124,18 +117,6 @@ static void __testname (int __i__)\
#define GST_END_TEST GST_LOG ("cleaning up tasks"); \ #define GST_END_TEST GST_LOG ("cleaning up tasks"); \
gst_task_cleanup_all (); \ gst_task_cleanup_all (); \
END_TEST END_TEST
#else
#define GST_START_TEST(__testname) \
static void __testname ()\
{\
GST_DEBUG ("test start"); \
tcase_fn_start (""# __testname, __FILE__, __LINE__);
#define GST_END_TEST GST_LOG ("cleaning up tasks"); \
gst_task_cleanup_all (); \
END_TEST
#endif
/* additional fail macros */ /* additional fail macros */
/** /**
@ -430,7 +411,6 @@ int main (int argc, char **argv) \
gboolean _gst_check_run_test_func (const gchar * func_name); gboolean _gst_check_run_test_func (const gchar * func_name);
#if __CHECK_VERSION_LATER_THAN(0,9,6)
static inline void static inline void
__gst_tcase_add_test (TCase * tc, TFun tf, const char * fname, int signal, __gst_tcase_add_test (TCase * tc, TFun tf, const char * fname, int signal,
int allowed_exit_value, int start, int end) int allowed_exit_value, int start, int end)
@ -439,29 +419,9 @@ __gst_tcase_add_test (TCase * tc, TFun tf, const char * fname, int signal,
_tcase_add_test (tc, tf, fname, signal, allowed_exit_value, start, end); _tcase_add_test (tc, tf, fname, signal, allowed_exit_value, start, end);
} }
} }
#elif __CHECK_VERSION_LATER_THAN(0,9,3)
static inline void
__gst_tcase_add_test (TCase * tc, TFun tf, const char * fname, int signal,
int start, int end)
{
if (_gst_check_run_test_func (fname)) {
_tcase_add_test (tc, tf, fname, signal, start, end);
}
}
#else
static inline void
__gst_tcase_add_test (TCase * tc, TFun tf, const char * fname, int signal)
{
if (_gst_check_run_test_func (fname)) {
_tcase_add_test (tc, tf, fname, signal);
}
}
#endif
#define _tcase_add_test __gst_tcase_add_test #define _tcase_add_test __gst_tcase_add_test
#undef __CHECK_VERSION_LATER_THAN
G_END_DECLS G_END_DECLS
#endif /* __GST_CHECK_H__ */ #endif /* __GST_CHECK_H__ */