summaryrefslogtreecommitdiff
path: root/test/assert-tests.c
blob: 1b9781481c4d3fa433acd2d4072fd5a8ea350376 (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
/*
 * 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

/* TODO: Test for each individual param being NULL. */
START_TEST (test_nslayout_layout_destroy_aborts1)
{
	(void) nslayout_layout_destroy(NULL);
}
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);
	tcase_add_test_raise_signal(
			tc_assert,
			test_nslayout_layout_destroy_aborts1,
			SIGABRT);
	suite_add_tcase(s, tc_assert);

	srunner_add_suite(sr, s);
}