Check function status and args on entry.

This commit is contained in:
Nigel Tao committed 2017-05-27 12:14:38 +10:00
1 parent c97511f24e
commit aa46c5479e
4 files changed
+65 -19

No files matched your search

+9
View File
@@ -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, //