-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_printd.c
More file actions
38 lines (33 loc) · 997 Bytes
/
test_printd.c
File metadata and controls
38 lines (33 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <stdio.h>
#include "ft_printf.h"
#include "libft/libft.h"
void test_printfd()
{
int n;
int s;
int test;
s = ft_printf("'% 4i'", 42);
//s = ft_printf("'%D'", -2147483649);
ft_printf("\nreturn: %d\n", s);
sleep(1);
printf("'% 4i'", 42);
//printf("%D", -2147483649);
/*printf("0 flag with min width > num width\n");
n = printf("EXPECTED: '%04d'\n", 22);
s= ft_printf("ACTUAL: '%04d'\n", 22);
printf("EXPECTED return: %d\n", n);
printf("ACTUAL return: %d\n", s);
n = ft_printf("Width: %3.3d\n", 2);
printf("Width: %5.4d\n", 235);
printf("Width: %04d\n", 245);
printf("Width: %4d\n", 267);*/
// n = ft_printf("%x\n", 0);
// printf("result: %x\n", n);
// n = ft_printf("%#d\n", 1);
// printf("Number sign: %#d\n", 1);
/*int len2 = 0;
len2 = ft_printf("%x\t%X\t%#x\t%#X this is s1\n", -10, 255, 255, 255);
n = printf("%x\t%X\t%#x\t%#X this is s2\n", -10, 255, 255, 255);
printf("n -> %d\tn2 -> %d\n", n, len2);
ft_printf("TESTING: %#x\n", 123456789123456789);*/
}