Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
luzpaz
gstreamer
Commits
e66ae668
Commit
e66ae668
authored
Mar 07, 2011
by
Stefan Kost
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: add a unit test for gst_caps_new_simple
Add a test for the crash in bug #642271.
parent
7c98ae2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
tests/check/gst/gstcaps.c
tests/check/gst/gstcaps.c
+21
-0
No files found.
tests/check/gst/gstcaps.c
View file @
e66ae668
...
...
@@ -795,6 +795,26 @@ GST_START_TEST (test_normalize)
GST_END_TEST
;
GST_START_TEST
(
test_broken
)
{
GstCaps
*
c1
;
/* NULL is not valid for media_type */
ASSERT_CRITICAL
(
c1
=
gst_caps_new_simple
(
NULL
,
"field"
,
G_TYPE_INT
,
1
,
NULL
));
fail_if
(
c1
);
#ifndef G_DISABLE_CHECKS
/* such a name is not valid, see gst_structure_validate_name() */
ASSERT_CRITICAL
(
c1
=
gst_caps_new_simple
(
"1#@abc"
,
"field"
,
G_TYPE_INT
,
1
,
NULL
));
fail_if
(
c1
);
#endif
}
GST_END_TEST
;
static
Suite
*
gst_caps_suite
(
void
)
{
...
...
@@ -815,6 +835,7 @@ gst_caps_suite (void)
tcase_add_test
(
tc_chain
,
test_intersect
);
tcase_add_test
(
tc_chain
,
test_intersect2
);
tcase_add_test
(
tc_chain
,
test_normalize
);
tcase_add_test
(
tc_chain
,
test_broken
);
return
s
;
}
...
...
Write
Preview
Markdown
is supported
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