summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2012-07-30 17:21:10 +0100
committerTim-Philipp Müller <tim@centricular.net>2012-07-30 17:21:10 +0100
commit71902797f22d8ba502cbdfbcc495f67b3b0cdb3c (patch)
treeb30e12d5d5761f46126047db1ab38ca9cf1c8d93 /tests
parent9461db97c21c5b9a86d5edb328bdd33857e2227d (diff)
downloadgstreamer-plugins-bad-71902797f22d8ba502cbdfbcc495f67b3b0cdb3c.tar.gz
tests: fix jifmux test for fixed fail()
https://bugzilla.gnome.org/show_bug.cgi?id=680755
Diffstat (limited to 'tests')
-rw-r--r--tests/check/elements/jifmux.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/tests/check/elements/jifmux.c b/tests/check/elements/jifmux.c
index dbc004ec5..e4680304a 100644
--- a/tests/check/elements/jifmux.c
+++ b/tests/check/elements/jifmux.c
@@ -314,15 +314,13 @@ compare_ ## name (ExifEntry * entry, ExifTagCheckData * testdata) \
if (!gst_tag_list_get_string_index (testdata->taglist, \
gst_tag, 0, &str_tag)) { \
/* fail the test if we can't get the tag */ \
- GST_WARNING ("Failed to get %s from taglist", gst_tag); \
- fail (); \
+ fail ("Failed to get %s from taglist", gst_tag); \
} \
\
value = __exif_tag_ ## name ## _to_exif_value (str_tag); \
\
if (value == -1) { \
- GST_WARNING ("Invalid %s tag value: %s", gst_tag, str_tag); \
- fail (); \
+ fail ("Invalid %s tag value: %s", gst_tag, str_tag); \
} \
\
if (entry->format == EXIF_TYPE_SHORT) \
@@ -332,9 +330,8 @@ compare_ ## name (ExifEntry * entry, ExifTagCheckData * testdata) \
exif_value = (gint) entry->data[0]; \
\
if (value != exif_value) { \
- GST_WARNING ("Gstreamer tag value (%d) is different from libexif (%d)", \
+ fail ("Gstreamer tag value (%d) is different from libexif (%d)", \
value, exif_value); \
- fail (); \
} \
\
testdata->result = TRUE; \
@@ -503,7 +500,7 @@ compare_flash (ExifEntry * entry, ExifTagCheckData * testdata)
} else if (strcmp (flash_mode, "never") == 0) {
fail_unless (((flags >> 3) & 0x3) == 2);
} else {
- fail ();
+ fail ("unexpected flash mode");
}
testdata->result = TRUE;
}
@@ -889,13 +886,14 @@ check_content (ExifContent * content, void *user_data)
case EXIF_TYPE_UNDEFINED:{
GstMapInfo map;
GstBuffer *buf;
+ GstSample *sample;
gint i;
- if (!gst_tag_list_get_buffer_index (test_data->taglist,
- tag_map[tagindex].gst_tag, 0, &buf)) {
+ if (!gst_tag_list_get_sample_index (test_data->taglist,
+ tag_map[tagindex].gst_tag, 0, &sample)) {
return;
}
-
+ buf = gst_sample_get_buffer (sample);
gst_buffer_map (buf, &map, GST_MAP_READ);
fail_unless (entry->size, map.size);
for (i = 0; i < map.size; i++) {
@@ -904,11 +902,11 @@ check_content (ExifContent * content, void *user_data)
gst_buffer_unmap (buf, &map);
test_data->result = TRUE;
- gst_buffer_unref (buf);
+ gst_sample_unref (sample);
}
break;
default:
- fail ();
+ fail ("unexpected exif type %d", entry->format);
}
}