Added runtime tests for TTY
Removed types Styling Added printing error and multi line string for logo Fix panic after rebase
This commit is contained in:
parent
6ece9a8440
commit
60164d9252
6 changed files with 459 additions and 337 deletions
|
@ -1,7 +1,7 @@
|
|||
const builtin = @import("builtin");
|
||||
const panic = @import("std").debug.panic;
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panicFmt(trace: ?*builtin.StackTrace, comptime format: []const u8, args: ...) noreturn {
|
||||
pub fn panic(trace: ?*builtin.StackTrace, comptime format: []const u8, args: ...) noreturn {
|
||||
@setCold(true);
|
||||
panic(format, args);
|
||||
std.debug.panic(format, args);
|
||||
}
|
||||
|
|
|
@ -69,11 +69,11 @@ pub fn init() void {
|
|||
|
||||
// User defined mocked functions
|
||||
|
||||
pub fn mock_entryColour(fg: u4, bg: u4) u8 {
|
||||
pub fn orig_entryColour(fg: u4, bg: u4) u8 {
|
||||
return u8(fg) | u8(bg) << 4;
|
||||
}
|
||||
|
||||
pub fn mock_entry(uc: u8, c: u8) u16 {
|
||||
pub fn orig_entry(uc: u8, c: u8) u16 {
|
||||
return u16(uc) | u16(c) << 8;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ def get_post_archinit_cases():
|
|||
TestCase("VGA init", [r"Init vga", r"Done"]),
|
||||
TestCase("VGA tests", [r"VGA: Tested max scan line", r"VGA: Tested cursor shape", r"VGA: Tested updating cursor"]),
|
||||
TestCase("TTY init", [r"Init tty", r"Done"]),
|
||||
TestCase("TTY tests", [r"TTY: Tested globals", r"TTY: Tested printing"]),
|
||||
TestCase("Init finishes", [r"Init done"])
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue