summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2011-11-09 11:24:26 +0100
committerStefan Sauer <ensonic@users.sf.net>2011-11-09 11:24:26 +0100
commit631d3e6f06d563fc3373bbdbad6420e637ad0d97 (patch)
tree146551cb5b4dacf4dba6b36d366d80778da345aa /tests
parenta357433a426bb253db4561b0108710fe8be37403 (diff)
tests: add a subset test for structure
Diffstat (limited to 'tests')
-rw-r--r--tests/check/gst/gststructure.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/check/gst/gststructure.c b/tests/check/gst/gststructure.c
index b37bd2443..58beee8db 100644
--- a/tests/check/gst/gststructure.c
+++ b/tests/check/gst/gststructure.c
@@ -421,6 +421,24 @@ GST_START_TEST (test_fixate_frac_list)
GST_END_TEST;
+GST_START_TEST (test_is_subset)
+{
+ GstStructure *s1, *s2;
+
+ s1 = gst_structure_from_string ("test/test, channels=(int){ 1, 2 }", NULL);
+ fail_if (s1 == NULL);
+ s2 = gst_structure_from_string ("test/test, channels=(int)[ 1, 2 ]", NULL);
+ fail_if (s2 == NULL);
+
+ fail_unless (gst_structure_is_subset (s1, s2));
+
+ gst_structure_free (s1);
+ gst_structure_free (s2);
+}
+
+GST_END_TEST;
+
+
GST_START_TEST (test_structure_nested)
{
GstStructure *sp, *sc1, *sc2;
@@ -618,6 +636,7 @@ gst_structure_suite (void)
tcase_add_test (tc_chain, test_structure_new);
tcase_add_test (tc_chain, test_fixate);
tcase_add_test (tc_chain, test_fixate_frac_list);
+ tcase_add_test (tc_chain, test_is_subset);
tcase_add_test (tc_chain, test_structure_nested);
tcase_add_test (tc_chain, test_structure_nested_from_and_to_string);
tcase_add_test (tc_chain, test_vararg_getters);