TaggedOpenLibrary constants off by one fix.
[AROS.git] / test / clib / strtoull.c
blobd2809aacc81755d454e9f7be0525c561b837c115
1 #include <stdlib.h>
2 #include <stdio.h>
3 #include "test.h"
5 int main(void)
7 #if defined(AROS_HAVE_LONG_LONG)
8 TEST((strtoull("0xff", NULL, 0) == 255ULL))
9 TEST((strtoull("0xff", NULL, 16) == 255ULL))
10 TEST((strtoull("0x0", NULL, 0) == 0ULL))
11 TEST((strtoull("0x0", NULL, 16) == 0ULL))
12 TEST((strtoull("0", NULL, 0) == 0ULL))
13 TEST((strtoull("0", NULL, 16) == 0ULL))
14 TEST((strtoull("0x0 ", NULL, 0) == 0ULL))
15 TEST((strtoull("0x0 ", NULL, 16) == 0ULL))
16 TEST((strtoull("0 ", NULL, 0) == 0ULL))
17 TEST((strtoull("0 ", NULL, 16) == 0ULL))
18 TEST((strtoull("0377", NULL, 0) == 255ULL))
19 TEST((strtoull("255", NULL, 0) == 255ULL))
20 TEST((strtoull("-1", NULL, 0) == -1ULL))
21 TEST((strtoull("-0xff", NULL, 0) == -255ULL))
22 TEST((strtoull("-0xff", NULL, 16) == -255ULL))
23 TEST((strtoull("-ff", NULL, 16) == -255ULL))
24 TEST((strtoull("-0377", NULL, 0) == -255ULL))
25 TEST((strtoull("-377", NULL, 8) == -255ULL))
26 #endif
27 return OK;
30 void cleanup(void)