From 25d81fe88c7e9aebe011b7b625b4eb7d31936591 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 2 Apr 2020 20:51:30 +0200 Subject: Added timeout detection --- helper.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'helper.c') diff --git a/helper.c b/helper.c index 3fd496f..d3f7cb4 100644 --- a/helper.c +++ b/helper.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/06 18:13:38 by cacharle #+# #+# */ -/* Updated: 2020/02/21 01:14:37 by cacharle ### ########.fr */ +/* Updated: 2020/04/02 20:31:04 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,6 +24,8 @@ char buf[BUF_SIZE + 1] = {0}; void test_setup(void) { + origin_buf = NULL; + user_buf = NULL; if (saved_stdout != -1) test_tear_down(); saved_stdout = dup(STDOUT_FILENO); @@ -80,6 +82,12 @@ void print_signaled_ko(char *msg) fflush(stdout); } +void print_timeouted(char *msg) +{ + printf("FAIL/TIMEOUT<>ARGS:%s<>EXPECTED:<>ACTUAL:\n", msg); + fflush(stdout); +} + inline void print_ok(void) { printf("OK\n"); fflush(stdout); } void ft_putstr_non_printable(char *str) -- cgit