blob: 1c1640920c3579602c416712d17d0e9e9a722f23 (
plain)
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
|
#include <stdio.h>
#include "header.h"
void print_buf_ko(char *msg)
{
print_ko();
printf("ft_printf(%s) has wrong output\n", msg);
printf("actual: \"%s\"", origin_buf);
printf("expected: \"%s\"", user_buf);
}
void print_ret_ko(char *msg)
{
print_ko();
printf("ft_printf(%s) has wrong return value\n", msg);
printf("actual: %d", origin_ret);
printf("expected: %d", user_ret);
}
void print_signaled_ko(char *msg)
{
print_ko();
printf("ft_printf(\"%s\") has been signaled (segfault and friends)\n", msg);
}
inline void print_ok(void) { printf("\033[32m[OK]\033[0m\n"); }
inline void print_ko(void) { printf("\033[31m[KO]\033[0m "); }
|