Usermode/libc - Fixed buggy strtoi code
[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
10 #define TST(t, class, base, val, exp, fmt) do {\
11         t ret = strto##class(#val, NULL, base); \
12         if( ret != exp ) \
13                 printf("FAIL strto"#class"('"#val"') != "#val" (act 0x"fmt")\n", ret);\
14 }while(0)
15
16 int main(int argc, char *argv[])
17 {
18         TST(unsigned long, ul, 0, 0x10ec, 0x10ec, "%x");
19 }

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