Add sun4i ram controller definitions
[AROS.git] / test / clib / strtoul.c
blobb83662225e7fce0bd74909d0596bb117f0ee6beb
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <stdlib.h>
7 #include <stdio.h>
8 #include "test.h"
10 int main(void)
12 TEST((strtoul("0xff", NULL, 0) == 255UL))
13 TEST((strtoul("0xff", NULL, 16) == 255UL))
14 TEST((strtoul("0x0", NULL, 0) == 0UL))
15 TEST((strtoul("0x0", NULL, 16) == 0UL))
16 TEST((strtoul("0", NULL, 0) == 0UL))
17 TEST((strtoul("0", NULL, 16) == 0UL))
18 TEST((strtoul("0x0 ", NULL, 0) == 0UL))
19 TEST((strtoul("0x0 ", NULL, 16) == 0UL))
20 TEST((strtoul("0 ", NULL, 0) == 0UL))
21 TEST((strtoul("0 ", NULL, 16) == 0UL))
22 TEST((strtoul("0377", NULL, 0) == 255UL))
23 TEST((strtoul("255", NULL, 0) == 255UL))
24 TEST((strtoul("-1", NULL, 0) == -1UL))
25 TEST((strtoul("-0xff", NULL, 0) == -255UL))
26 TEST((strtoul("-0xff", NULL, 16) == -255UL))
27 TEST((strtoul("-ff", NULL, 16) == -255UL))
28 TEST((strtoul("-0377", NULL, 0) == -255UL))
29 TEST((strtoul("-377", NULL, 8) == -255UL))
30 return OK;
33 void cleanup(void)