mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 06:17:49 +00:00
26 lines
488 B
Rust
26 lines
488 B
Rust
#![no_std]
|
|
#![no_main]
|
|
#![feature(custom_test_frameworks)]
|
|
#![test_runner(blog_os::test_runner)]
|
|
#![reexport_test_harness_main = "test_main"]
|
|
|
|
use blog_os::println;
|
|
use core::panic::PanicInfo;
|
|
|
|
#[unsafe(no_mangle)] // don't mangle the name of this function
|
|
pub extern "C" fn _start() -> ! {
|
|
test_main();
|
|
|
|
loop {}
|
|
}
|
|
|
|
#[panic_handler]
|
|
fn panic(info: &PanicInfo) -> ! {
|
|
blog_os::test_panic_handler(info)
|
|
}
|
|
|
|
#[test_case]
|
|
fn test_println() {
|
|
println!("test_println output");
|
|
}
|