summaryrefslogtreecommitdiff
path: root/test/assert-tests.c
blob: f30efede80b73ea9501e6ac54db27281d0908f9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * 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_nsl_layout_create_aborts1)
{
	nsl_layout *layout;

	(void) nsl_layout_create(NULL, NULL, NULL, NULL, NULL, &layout);
}
END_TEST

/* TODO: Test for each individual param being NULL. */
START_TEST (test_nsl_layout_destroy_aborts1)
{
	(void) nsl_layout_destroy(NULL);
}
END_TEST


void nsl_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_nsl_layout_create_aborts1,
			SIGABRT);
	tcase_add_test_raise_signal(
			tc_assert,
			test_nsl_layout_destroy_aborts1,
			SIGABRT);
	suite_add_tcase(s, tc_assert);

	srunner_add_suite(sr, s);
}