aboutsummaryrefslogtreecommitdiff
path: root/helper.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-11-03 05:29:04 +0100
committerCharles <sircharlesaze@gmail.com>2019-11-03 05:29:04 +0100
commit84b61fcc2602c39e9dc8cd6390f733d6987ccbfe (patch)
tree4f84e66b3ea20bea0243674bcd160e5c22c0db2c /helper.c
parent0f957d89c90062fdf8ad8ce4c3796b54b51d20e9 (diff)
downloadft_printf_test-84b61fcc2602c39e9dc8cd6390f733d6987ccbfe.tar.gz
ft_printf_test-84b61fcc2602c39e9dc8cd6390f733d6987ccbfe.tar.bz2
ft_printf_test-84b61fcc2602c39e9dc8cd6390f733d6987ccbfe.zip
Added printf_tester tests
Diffstat (limited to 'helper.c')
-rw-r--r--helper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/helper.c b/helper.c
index 9fe8d56..4a25772 100644
--- a/helper.c
+++ b/helper.c
@@ -4,7 +4,7 @@
#include <string.h>
#include "header.h"
-#define BUF_SIZE (1 << 10)
+#define BUF_SIZE (1 << 16)
int pipefd[2];
int saved_stdout = -1;
@@ -42,7 +42,7 @@ char *read_stdout_buf(void)
void print_buf_ko(char *msg)
{
print_ko();
- printf("ft_printf(%s) has wrong output\n", msg);
+ printf("ft_printf(%s): output error\n", msg);
printf("actual: \"%s\"\n", user_buf);
printf("expected: \"%s\"\n", origin_buf);
fflush(stdout);
@@ -51,7 +51,7 @@ void print_buf_ko(char *msg)
void print_ret_ko(char *msg)
{
print_ko();
- printf("ft_printf(%s) has wrong return value\n", msg);
+ printf("ft_printf(%s): return error\n", msg);
printf("actual: %d\n", user_ret);
printf("expected: %d\n", origin_ret);
fflush(stdout);
@@ -60,7 +60,7 @@ void print_ret_ko(char *msg)
void print_signaled_ko(char *msg)
{
print_ko();
- printf("ft_printf(\"%s\") has been signaled (segfault and friends)\n", msg);
+ printf("ft_printf(\"%s\"): segfault)\n", msg);
fflush(stdout);
}