Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GStreamer
gstreamer
Commits
d430552e
Commit
d430552e
authored
Mar 19, 2009
by
Tim-Philipp Müller
Browse files
gstcheck: fix for check versions > 0.9.6
A new argument allowed_exit_value was added in SVN recently (#574213).
parent
b4b386a1
Changes
1
Show whitespace changes
Inline
Side-by-side
libs/gst/check/gstcheck.h
View file @
d430552e
...
@@ -38,6 +38,12 @@ G_BEGIN_DECLS
...
@@ -38,6 +38,12 @@ 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
...
@@ -108,9 +114,7 @@ gst_check_message_error (msg, GST_MESSAGE_ERROR, \
...
@@ -108,9 +114,7 @@ gst_check_message_error (msg, GST_MESSAGE_ERROR, \
*
*
* wrapper for checks END_TEST
* wrapper for checks END_TEST
*/
*/
#if CHECK_MAJOR_VERSION > 0 || \
#if __CHECK_VERSION_LATER_THAN(0,9,3)
(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) \
#define GST_START_TEST(__testname) \
static void __testname (int __i__)\
static void __testname (int __i__)\
{\
{\
...
@@ -421,9 +425,16 @@ int main (int argc, char **argv) \
...
@@ -421,9 +425,16 @@ 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_MAJOR_VERSION > 0 || \
#if __CHECK_VERSION_LATER_THAN(0,9,6)
(CHECK_MAJOR_VERSION == 0 && CHECK_MINOR_VERSION > 9) || \
static
inline
void
(CHECK_MAJOR_VERSION == 0 && CHECK_MINOR_VERSION == 9 && CHECK_MICRO_VERSION > 3)
__gst_tcase_add_test
(
TCase
*
tc
,
TFun
tf
,
const
char
*
fname
,
int
signal
,
int
allowed_exit_value
,
int
start
,
int
end
)
{
if
(
_gst_check_run_test_func
(
fname
))
{
_tcase_add_test
(
tc
,
tf
,
fname
,
signal
,
allowed_exit_value
,
start
,
end
);
}
}
#elif __CHECK_VERSION_LATER_THAN(0,9,3)
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
start
,
int
end
)
int
start
,
int
end
)
...
@@ -444,6 +455,8 @@ __gst_tcase_add_test (TCase * tc, TFun tf, const char * fname, int signal)
...
@@ -444,6 +455,8 @@ __gst_tcase_add_test (TCase * tc, TFun tf, const char * fname, int signal)
#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__ */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment