mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 16:32:11 +01:00
Check function status and args on entry.
This commit is contained in:
1 parent
c97511f24e
commit
aa46c5479e
4 files changed
+65
-19
No files matched your search
@@ -17,6 +17,14 @@ Each edition should print "PASS", amongst other information, and exit(0).
|
||||
|
||||
const char* test_filename = "gif/basic.c";
|
||||
|
||||
void test_null_receiver() {
|
||||
puffs_gif_status status = puffs_gif_lzw_decoder_decode(NULL);
|
||||
if (status != puffs_gif_error_null_receiver) {
|
||||
FAIL("test_null_receiver: status: got %d, want %d", status,
|
||||
puffs_gif_error_null_receiver);
|
||||
}
|
||||
}
|
||||
|
||||
void test_puffs_version_bad() {
|
||||
puffs_gif_lzw_decoder dec;
|
||||
puffs_gif_lzw_decoder_constructor(&dec, 0); // 0 is not PUFFS_VERSION.
|
||||
@@ -48,6 +56,7 @@ cleanup0:
|
||||
|
||||
// The empty comments forces clang-format to place one element per line.
|
||||
test tests[] = {
|
||||
test_null_receiver, //
|
||||
test_puffs_version_bad, //
|
||||
test_puffs_version_good, //
|
||||
NULL, //
|
||||
|
||||
Reference in new issue
Block a user