aboutsummaryrefslogtreecommitdiff
path: root/helper.c
blob: ebfa232f002360f5e27214fd874eb8240727be81 (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
#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);
}