zathura/tests/test_utils.c

31 lines
667 B
C
Raw Normal View History

2018-11-27 23:10:18 +01:00
/* SPDX-License-Identifier: Zlib */
2012-01-28 19:54:10 +01:00
#include <check.h>
2014-11-07 15:57:46 +01:00
#include "utils.h"
#include "tests.h"
2012-01-28 19:54:10 +01:00
2012-03-15 16:38:20 +01:00
START_TEST(test_file_valid_extension_null) {
2021-09-20 00:04:58 +02:00
ck_assert(file_valid_extension(NULL, NULL) == false);
ck_assert(file_valid_extension((void*) 0xDEAD, NULL) == false);
ck_assert(file_valid_extension(NULL, "pdf") == false);
2012-03-15 16:38:20 +01:00
} END_TEST
static Suite* suite_utils(void)
2012-01-28 19:54:10 +01:00
{
TCase* tcase = NULL;
Suite* suite = suite_create("Utils");
2012-03-15 16:38:20 +01:00
/* file valid extension */
tcase = tcase_create("file_valid_extension");
tcase_add_test(tcase, test_file_valid_extension_null);
suite_add_tcase(suite, tcase);
2012-01-28 19:54:10 +01:00
return suite;
}
int main()
{
return run_suite(suite_utils());
}