diff options
Diffstat (limited to 'test/assert-tests.c')
-rw-r--r-- | test/assert-tests.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/assert-tests.c b/test/assert-tests.c new file mode 100644 index 0000000..4fca036 --- /dev/null +++ b/test/assert-tests.c @@ -0,0 +1,38 @@ +/* + * This file is part of LibNSLayout's tests + * Licensed under the ISC License, http://opensource.org/licenses/ISC + * Copyright 2015 Michael Drake <tlsa@netsurf-browser.org> + */ + +#include <check.h> +#include <stdlib.h> +#include <string.h> + +#include "tests.h" + +#ifndef UNUSED +#define UNUSED(x) (void)(x) +#endif + +/* TODO: Test for each individual param being NULL. */ +START_TEST (test_nslayout_layout_create_aborts1) +{ + nslayout_layout *layout; + (void) nslayout_layout_create(NULL, NULL, NULL, NULL, NULL, &layout); +} +END_TEST + + +void nslayout_assert_suite(SRunner *sr) +{ + Suite *s = suite_create("libnslayout: API Assert tests"); + TCase *tc_assert = tcase_create("Creation/Destruction"); + + tcase_add_test_raise_signal( + tc_assert, + test_nslayout_layout_create_aborts1, + SIGABRT); + suite_add_tcase(s, tc_assert); + + srunner_add_suite(sr, s); +} |