summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2015-05-27 22:23:00 +1000
committerJan Schmidt <jan@centricular.com>2015-06-03 00:48:17 +1000
commit58e5cd2695145864b9e23ceba690aced5962f59a (patch)
tree61317b39d8d9f707f9fb9a689c0b5cb5f21b5011 /tests
parentc5a3e8db37b62f557a09314dc99507c4a43ff3d8 (diff)
gstvalue: Implement gst_value_is_subset() for flagsets
Diffstat (limited to 'tests')
-rw-r--r--tests/check/gst/gstvalue.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/check/gst/gstvalue.c b/tests/check/gst/gstvalue.c
index 554866ee3..18ce2f5da 100644
--- a/tests/check/gst/gstvalue.c
+++ b/tests/check/gst/gstvalue.c
@@ -664,8 +664,18 @@ GST_START_TEST (test_flagset)
"resulting mask is 0x%u, not 0x%x",
gst_value_get_flagset_mask (&dest), test_mask);
+ gst_value_set_flagset (&value,
+ GST_SEEK_FLAG_ACCURATE, GST_SEEK_FLAG_ACCURATE);
+ gst_value_set_flagset (&value2, GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_FLUSH,
+ GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_SNAP_BEFORE | GST_SEEK_FLAG_FLUSH);
+ /* Check that accurate alone is a subset of accurate+!snap_before+flush,
+ * but not vice-versa */
+ fail_unless (gst_value_is_subset (&value, &value2));
+ fail_if (gst_value_is_subset (&value2, &value));
+
g_value_unset (&dest);
g_value_unset (&value);
+ g_value_unset (&value2);
}
GST_END_TEST;