mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
libs/gst/check/gstcheck.h: Fix detection of the check version we're compiling against (would otherwise break if check...
Original commit message from CVS: 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).
This commit is contained in:
parent
b0076d395d
commit
b0ba7ff031
2 changed files with 30 additions and 6 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
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),
|
||||
|
|
|
@ -94,7 +94,9 @@ gst_check_message_error (msg, GST_MESSAGE_ERROR, \
|
|||
*
|
||||
* 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__)\
|
||||
{\
|
||||
|
@ -401,16 +403,28 @@ int main (int argc, char **argv) \
|
|||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue