mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Make cargo test work
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
#![cfg_attr(not(test), no_main)]
|
||||
|
||||
use core::panic::PanicInfo;
|
||||
|
||||
mod vga_buffer;
|
||||
|
||||
#[cfg(not(test))]
|
||||
#[no_mangle]
|
||||
pub extern "C" fn _start() -> ! {
|
||||
println!("Hello World{}", "!");
|
||||
@@ -13,6 +14,7 @@ pub extern "C" fn _start() -> ! {
|
||||
}
|
||||
|
||||
/// This function is called on panic.
|
||||
#[cfg(not(test))]
|
||||
#[panic_handler]
|
||||
fn panic(info: &PanicInfo) -> ! {
|
||||
println!("{}", info);
|
||||
|
||||
Reference in New Issue
Block a user