projects
/
microwatt.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
af0c04bcd7abff311ee8c59108b10d65001cbde3
[microwatt.git]
/
tests
/
illegal
/
illegal.c
1
#include <stddef.h>
2
#include <stdint.h>
3
#include <stdbool.h>
4
5
#include
"console.h"
6
7
#define TEST
"Test "
8
#define PASS
"PASS
\n
"
9
#define FAIL
"FAIL
\n
"
10
11
extern
int
ill_test_1
(
void
);
12
13
// i < 100
14
void
print_test_number
(
int
i
)
15
{
16
puts
(
TEST
);
17
putchar
(
48
+
i
/
10
);
18
putchar
(
48
+
i
%
10
);
19
putchar
(
':'
);
20
}
21
22
int
main
(
void
)
23
{
24
int
fail
=
0
;
25
26
potato_uart_init
();
27
28
print_test_number
(
1
);
29
if
(
ill_test_1
() !=
0
) {
30
fail
=
1
;
31
puts
(
FAIL
);
32
}
else
33
puts
(
PASS
);
34
35
return
fail
;
36
}