mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 00:47:28 +01:00
Add a basic test framework.
This commit is contained in:
1 parent
ca9fba83c5
commit
9724466233
2 files changed
+44
-6
No files matched your search
+17
-6
@@ -11,15 +11,26 @@ for cc in clang gcc; do
|
||||
done
|
||||
|
||||
It should print:
|
||||
clang: PASS
|
||||
gcc: PASS
|
||||
clang: PASS (N tests run)
|
||||
gcc: PASS (N tests run)
|
||||
for some value of N.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "../testlib/testlib.c"
|
||||
|
||||
#include "../../../gen/c/gif.c"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
printf("PASS\n");
|
||||
return 0;
|
||||
void test_default_literal_width() {
|
||||
puffs_gif_lzw_decoder dec;
|
||||
puffs_gif_lzw_decoder_constructor(&dec);
|
||||
if (dec.f_literal_width != 0) {
|
||||
FAIL("test_default_literal_width: got %d, want %d", dec.f_literal_width, 0);
|
||||
puffs_gif_lzw_decoder_destructor(&dec);
|
||||
return;
|
||||
}
|
||||
puffs_gif_lzw_decoder_destructor(&dec);
|
||||
}
|
||||
|
||||
test tests[] = {
|
||||
test_default_literal_width, NULL,
|
||||
};
|
||||
Reference in new issue
Block a user