Usermode/libc - Fixed some warnings in strtoi tests
[tpg/acess2.git] / Usermode / Libraries / libc.so_src / TEST_strtoi.c
1 /*
2  * Acess2 C Library (Test)
3  * - By John Hodge (thePowersGang)
4  *
5  * TEST_strtoi.c
6  * - Tests for strtoi.c
7  */
8 #include <stdio.h>
9 #include <stdlib.h>
10
11 #define TST(t, class, base, val, exp, fmt) do {\
12         t ret = strto##class(#val, NULL, base); \
13         if( ret != exp ) \
14                 printf("FAIL strto"#class"('"#val"') != "#val" (act 0x"fmt")\n", ret);\
15 }while(0)
16
17 int main(int argc, char *argv[])
18 {
19         TST(unsigned long, ul, 0, 0x10ec, 0x10ec, "%lx");
20         TST(unsigned long long, ull, 0, 0xffeed10ec, 0xffeed10ec, "%llx");
21 }

UCC git Repository :: git.ucc.asn.au