summaryrefslogtreecommitdiff
path: root/stddef.c
blob: 575881d8801cd19d65d65ad1d734fbc4553a9d75 (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
#include <stddef.h>
#include "test.h"

struct s {
	char a;
	char b;
};

void test_stddef_h(void)
{
	ptrdiff_t ptrdiff;
	size_t size;
	wchar_t wchar;

	static struct s the_s;

	(void)ptrdiff;
	(void)size;
	(void)wchar;

	testing_header("stddef.h");

	test_true(NULL == 0);

	test_int_equals(offsetof(struct s, b), (char*)&(the_s.b) - (char*)&the_s);

	testing_end();
}