+2007-12-20 Tim-Philipp Müller <tim at centricular dot net>
+
+ Patch by: Peter Kjellerstedt <pkj axis com>
+
+ * libs/gst/check/gstcheck.h:
+ Fix detection of the check version we're compiling against (would
+ otherwise break if check goes v0.10.0); correctly report the
+ name of the failed test again in case of failure, instead of
+ just 'tf' (fixes #504499).
+
2007-12-19 Wim Taymans <wim.taymans@collabora.co.uk>
* libs/gst/base/gstbasesrc.c: (gst_base_src_send_event),
*
* wrapper for checks END_TEST
*/
-#if CHECK_MAJOR_VERSION >= 0 && CHECK_MINOR_VERSION >= 9 && CHECK_MICRO_VERSION >= 4
+#if CHECK_MAJOR_VERSION > 0 || \
+ (CHECK_MAJOR_VERSION == 0 && CHECK_MINOR_VERSION > 9) || \
+ (CHECK_MAJOR_VERSION == 0 && CHECK_MINOR_VERSION == 9 && CHECK_MICRO_VERSION > 3)
#define GST_START_TEST(__testname) \
static void __testname (int __i__)\
{\
gboolean _gst_check_run_test_func (const gchar * func_name);
+#if CHECK_MAJOR_VERSION > 0 || \
+ (CHECK_MAJOR_VERSION == 0 && CHECK_MINOR_VERSION > 9) || \
+ (CHECK_MAJOR_VERSION == 0 && CHECK_MINOR_VERSION == 9 && CHECK_MICRO_VERSION > 3)
static inline void
-__gst_tcase_add_test (TCase * tc, TFun tf, const gchar * func_name)
+__gst_tcase_add_test (TCase * tc, TFun tf, const char * fname, int signal,
+ int start, int end)
{
- if (_gst_check_run_test_func (func_name)) {
- tcase_add_test (tc, tf);
+ 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
-#undef tcase_add_test
-#define tcase_add_test(tc,tf) __gst_tcase_add_test(tc,tf,G_STRINGIFY(tf))
+#define _tcase_add_test __gst_tcase_add_test
G_END_DECLS