XeOS/tests/basic_boot.rs

30 lines
587 B
Rust
Raw Normal View History

2019-10-23 23:19:02 +00:00
#![no_std]
#![no_main]
#![feature(custom_test_frameworks)]
#![test_runner(xe_os::test_runner)]
#![reexport_test_harness_main = "test_main"]
2019-10-24 00:30:47 +00:00
use bootloader::{entry_point, BootInfo};
2019-10-24 14:43:38 +00:00
use core::panic::PanicInfo;
2019-10-23 23:19:02 +00:00
use xe_os::{println, serial_print, serial_println};
2019-10-24 00:30:47 +00:00
entry_point!(kmain);
fn kmain(_: &'static BootInfo) -> ! {
2019-10-23 23:19:02 +00:00
test_main();
loop {}
}
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
xe_os::test_panic_handler(info);
}
#[test_case]
fn test_println() {
serial_print!("test_println... ");
println!("test_println output");
serial_println!("[ok]");
}