summaryrefslogtreecommitdiff
path: root/errno.c
blob: 63e003cc032f035362b113124563eac45fa3bbd3 (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
#include <errno.h>
#include "test.h"

#ifndef EDOM
#error EDOM not defined
#endif

#ifndef ERANGE
#error ERANGE not defined
#endif

#if __STDC_VERSION__ >= 199409
#ifndef EILSEQ
#error EILSEQ not defined
#endif
#endif

void test_errno(void)
{
	struct lconv *lc;
	int errno_values[] = {
		EDOM,
		ERANGE,
		#ifdef EILSEQ
		EILSEQ,
		#endif
	};

	testing_header("errno.h");

	test_distinct(errno_values);

	testing_end();
}