Commit 31aa5301 authored by Moritz Lipp's avatar Moritz Lipp

Add testcase for NP check

parent ce2113bb
......@@ -23,6 +23,12 @@ START_TEST(test_file_get_extension_single) {
fail_unless(strcmp(extension, "pdf") == 0, NULL);
} END_TEST
START_TEST(test_file_valid_extension_null) {
fail_unless(file_valid_extension(NULL, NULL) == false, NULL);
fail_unless(file_valid_extension((void*) 0xDEAD, NULL) == false, NULL);
fail_unless(file_valid_extension(NULL, "pdf") == false, NULL);
} END_TEST
Suite* suite_utils()
{
TCase* tcase = NULL;
......@@ -40,5 +46,10 @@ Suite* suite_utils()
tcase_add_test(tcase, test_file_get_extension_single);
suite_add_tcase(suite, tcase);
/* file valid extension */
tcase = tcase_create("file_valid_extension");
tcase_add_test(tcase, test_file_valid_extension_null);
suite_add_tcase(suite, tcase);
return suite;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment