This commit is contained in:
Timo Schmidt 2023-05-03 22:33:59 +02:00
parent bca8dea256
commit e8dcc3ccd1
4 changed files with 7 additions and 7 deletions

View File

@ -39,7 +39,7 @@ static int expect_counter = 0;
dup2(old_stderr_fd, 2); \ dup2(old_stderr_fd, 2); \
} while(0) } while(0)
#define expect(inp, func, ...) \ #define expect(func, ...) \
do { \ do { \
int old_stdout_fd = dup(1); \ int old_stdout_fd = dup(1); \
dup2(2, 1); \ dup2(2, 1); \
@ -60,4 +60,4 @@ int main(){
test (printf, "%d\n", ft_isalnum('0')); test (printf, "%d\n", ft_isalnum('0'));
expect(printf, "%d\n", isalnum('0')); expect(printf, "%d\n", isalnum('0'));
return 0; return 0;
} }

View File

@ -39,7 +39,7 @@ static int expect_counter = 0;
dup2(old_stderr_fd, 2); \ dup2(old_stderr_fd, 2); \
} while(0) } while(0)
#define expect(inp, func, ...) \ #define expect(func, ...) \
do { \ do { \
int old_stdout_fd = dup(1); \ int old_stdout_fd = dup(1); \
dup2(2, 1); \ dup2(2, 1); \
@ -82,4 +82,4 @@ int main(){
test (printf, "%d\n", ft_isalpha('Z' + 1)); test (printf, "%d\n", ft_isalpha('Z' + 1));
expect(printf, "%d\n", isalpha('Z' + 1)); expect(printf, "%d\n", isalpha('Z' + 1));
return 0; return 0;
} }

View File

@ -39,7 +39,7 @@ static int expect_counter = 0;
dup2(old_stderr_fd, 2); \ dup2(old_stderr_fd, 2); \
} while(0) } while(0)
#define expect(inp, func, ...) \ #define expect(func, ...) \
do { \ do { \
int old_stdout_fd = dup(1); \ int old_stdout_fd = dup(1); \
dup2(2, 1); \ dup2(2, 1); \
@ -84,4 +84,4 @@ int main(){
test (printf, "%d\n", ft_isdigit(127)); test (printf, "%d\n", ft_isdigit(127));
expect(printf, "%d\n", isdigit(127)); expect(printf, "%d\n", isdigit(127));
return 0; return 0;
} }

View File

@ -39,7 +39,7 @@ static int expect_counter = 0;
dup2(old_stderr_fd, 2); \ dup2(old_stderr_fd, 2); \
} while(0) } while(0)
#define expect(inp, func, ...) \ #define expect(func, ...) \
do { \ do { \
int old_stdout_fd = dup(1); \ int old_stdout_fd = dup(1); \
dup2(2, 1); \ dup2(2, 1); \