2019-09-23 16:12:07 -04:00
|
|
|
#![no_std]
|
|
|
|
#![no_main]
|
2019-09-24 13:38:25 -04:00
|
|
|
#![feature(custom_test_frameworks)]
|
|
|
|
#![test_runner(blog_os::test_runner)]
|
|
|
|
#![reexport_test_harness_main = "test_main"]
|
2019-09-23 16:12:07 -04:00
|
|
|
|
|
|
|
use core::panic::PanicInfo;
|
|
|
|
|
2019-09-24 13:38:25 -04:00
|
|
|
use blog_os::println;
|
2019-09-24 10:20:27 -04:00
|
|
|
|
2019-09-23 16:12:07 -04:00
|
|
|
/// This function is called on panic.
|
2019-09-24 13:38:25 -04:00
|
|
|
#[cfg(not(test))]
|
2019-09-23 16:12:07 -04:00
|
|
|
#[panic_handler]
|
2019-09-24 10:20:27 -04:00
|
|
|
fn panic(info: &PanicInfo) -> ! {
|
|
|
|
println!("{}", info);
|
2019-09-23 16:12:07 -04:00
|
|
|
loop {}
|
|
|
|
}
|
|
|
|
|
2019-09-24 13:38:25 -04:00
|
|
|
#[cfg(test)]
|
|
|
|
#[panic_handler]
|
|
|
|
fn panic(info: &PanicInfo) -> ! {
|
|
|
|
blog_os::test_panic_handler(info)
|
|
|
|
}
|
|
|
|
|
2019-09-23 16:12:07 -04:00
|
|
|
#[no_mangle]
|
|
|
|
pub extern "C" fn _start() -> ! {
|
2019-09-24 13:38:25 -04:00
|
|
|
println!("Hello World{}", "!");
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
test_main();
|
2019-09-23 16:31:22 -04:00
|
|
|
|
2019-09-23 16:12:07 -04:00
|
|
|
loop {}
|
|
|
|
}
|