blob: c8310903fc7675d70982b471283ad3d1fbf78951 (
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
28
29
30
31
32
33
34
35
36
37
38
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* helper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 03:07:07 by cacharle #+# #+# */
/* Updated: 2020/02/08 03:07:08 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "libasm_test.h"
void
print_ok(void)
{
printf("OK: %s\n", test_name);
fflush(stdout);
}
void
print_signaled_ko(void)
{
printf("KO: [SEGFAULT]: %s\n", test_name);
fflush(stdout);
}
void
expect_int(int expected, int actual)
{
if (actual != expected)
printf("KO: [COMPARE]: %s: expected: %d got: %d\n", test_name, expected, actual);
else
print_ok();
fflush(stdout);
}
|