From 99a4f8397a9652b15d171ecb86e7281b80ed57d7 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 1 May 2020 10:11:13 +0200 Subject: Adding errno checking according to new subject (#2) prettier compatible with python < 3.6 removed unaccurate test for ft_read --- libasm_test.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'libasm_test.h') diff --git a/libasm_test.h b/libasm_test.h index 362d91a..1e26c34 100644 --- a/libasm_test.h +++ b/libasm_test.h @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/08 03:07:19 by cacharle #+# #+# */ -/* Updated: 2020/04/13 14:41:40 by charles ### ########.fr */ +/* Updated: 2020/05/04 16:05:51 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,6 +22,7 @@ # include # include # include +# include # define TO_STRING(x) #x @@ -113,7 +114,7 @@ bool signaled; wait(&pid); \ signaled = !WIFEXITED(pid); \ } \ -} while(0); +} while(0) char *test_name; @@ -123,6 +124,12 @@ char *test_name; print_signaled_ko(); \ else \ print_ok(); \ -} while(0); +} while(0) + +# define ERRNO_WRAP(x, errno_save) do { \ + errno = 0; \ + do { x; } while (0); \ + errno_save = errno; \ +} while(0) #endif -- cgit