mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-17 16:32:11 +01:00
Add "gif-pixel-data-none" test
This commit is contained in:
1 parent
dd861416ff
commit
917a94b445
3 files changed
+41
No files matched your search
@@ -1019,6 +1019,23 @@ const char* test_wuffs_gif_decode_multiple_loop_counts() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* test_wuffs_gif_decode_pixel_data_none() {
|
||||
CHECK_FOCUS(__func__);
|
||||
|
||||
wuffs_base__io_buffer src = ((wuffs_base__io_buffer){
|
||||
.data = global_src_slice,
|
||||
});
|
||||
|
||||
const char* status =
|
||||
read_file(&src, "test/data/artificial/gif-pixel-data-none.gif");
|
||||
if (status) {
|
||||
return status;
|
||||
}
|
||||
|
||||
return do_test_wuffs_gif_decode_expecting(
|
||||
src, wuffs_base__error__not_enough_data, true);
|
||||
}
|
||||
|
||||
const char* test_wuffs_gif_decode_not_enough_data() {
|
||||
CHECK_FOCUS(__func__);
|
||||
|
||||
@@ -1669,6 +1686,7 @@ proc tests[] = {
|
||||
test_wuffs_gif_decode_input_is_a_png, //
|
||||
test_wuffs_gif_decode_missing_two_src_bytes, //
|
||||
test_wuffs_gif_decode_multiple_loop_counts, //
|
||||
test_wuffs_gif_decode_pixel_data_none, //
|
||||
test_wuffs_gif_decode_not_enough_data, //
|
||||
test_wuffs_gif_decode_too_much_data, //
|
||||
test_wuffs_gif_frame_dirty_rect, //
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 40 B |
@@ -0,0 +1,23 @@
|
||||
# Feed this file to script/make-artificial.go
|
||||
|
||||
make gif
|
||||
|
||||
header
|
||||
|
||||
image {
|
||||
imageWidthHeight 2 2
|
||||
palette {
|
||||
0x00 0x00 0xFF
|
||||
0x11 0x00 0xFF
|
||||
0x22 0x00 0xFF
|
||||
0x33 0x00 0xFF
|
||||
}
|
||||
}
|
||||
|
||||
frame {
|
||||
frameLeftTopWidthHeight 0 0 2 2
|
||||
}
|
||||
# The frame is 4 pixels, but we don't supply any.
|
||||
lzw 2
|
||||
|
||||
trailer
|
||||
Reference in new issue
Block a user