2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
10 #define TESTNUMBER1 11
11 #define TESTNUMBER1STRLEN 2
12 #define TEST1RESULT "11"
13 #define TEST2RESULT "11"
14 #define TEST3RESULT "11"
18 static void cleanbuffer(char * buf
)
20 memset(buf
, 0xff, BUFSIZE
);
23 static int stringsame(char * c1
, char * c2
, int size
)
26 for(i
= 0; i
< size
; i
++)
27 if (c1
[i
] != c2
[i
]) return 0;
35 long long n2
= TESTNUMBER1
;
36 long long n3
= TESTNUMBER1
;
39 /* check standard %d conversion */
41 TEST((sprintf(buf
, "%d", n1
) == TESTNUMBER1STRLEN
));
42 TEST((stringsame(buf
, TEST1RESULT
, TESTNUMBER1STRLEN
) == 1));
44 /* check standard %qd conversion */
46 TEST((sprintf(buf
, "%qd", n2
) == TESTNUMBER1STRLEN
));
47 TEST((stringsame(buf
, TEST2RESULT
, TESTNUMBER1STRLEN
) == 1));
49 /* check standard %lld conversion */
51 TEST((sprintf(buf
, "%lld", n3
) == TESTNUMBER1STRLEN
));
52 TEST((stringsame(buf
, TEST3RESULT
, TESTNUMBER1STRLEN
) == 1));