1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-02-11 02:30:11 +00:00
Files
antonblanchard.microwatt/tests/illegal/illegal.c
Benjamin Herrenschmidt a87b86e54f console: Replace putstr with puts
It makes things a bit more standard and a bit nicer to read
without all those strlen(). Also console.c takes care of adding
the carriage returns before the linefeeds.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-15 20:48:47 +10:00

37 lines
465 B
C

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include "console.h"
#define TEST "Test "
#define PASS "PASS\n"
#define FAIL "FAIL\n"
extern int ill_test_1(void);
// i < 100
void print_test_number(int i)
{
puts(TEST);
putchar(48 + i/10);
putchar(48 + i%10);
putchar(':');
}
int main(void)
{
int fail = 0;
potato_uart_init();
print_test_number(1);
if (ill_test_1() != 0) {
fail = 1;
puts(FAIL);
} else
puts(PASS);
return fail;
}