summaryrefslogtreecommitdiff
path: root/inttypes.c
blob: 0d88d9b57bd5565fc93b367d40015fec5dcd26b3 (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
#if defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__
#include <wchar.h>
#include <inttypes.h>
#include "test.h"

void test_inttypes_h(void)
{
	imaxdiv_t imaxdiv;
	char *endptr;

	testing_header("inttypes.h");

	test_true(imaxabs(-1) == 1);

	intmax_t im = strtoimax("100000000q", &endptr, 0);
	test_true(im == 100000000);
	test_true(*endptr == 'q');

	testing_end();
}

#else
void test_inttypes_h(void)
{
}
#endif