add tests, serial, lib, etc (3h1m)
This commit is contained in:
parent
584aa7b38d
commit
cbd2cfc1d4
7 changed files with 239 additions and 24 deletions
32
tests/basic_boot.rs
Normal file
32
tests/basic_boot.rs
Normal file
|
@ -0,0 +1,32 @@
|
|||
// Basic boot test
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
#![feature(custom_test_frameworks)]
|
||||
#![test_runner(donald::test_runner)]
|
||||
#![reexport_test_harness_main = "test_main"]
|
||||
|
||||
use core::panic::PanicInfo;
|
||||
|
||||
#[no_mangle] // don't mangle the name of this function
|
||||
pub extern "C" fn _start() -> ! {
|
||||
test_main();
|
||||
|
||||
loop {}
|
||||
}
|
||||
|
||||
fn test_runner(tests: &[&dyn Fn()]) {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[panic_handler]
|
||||
fn panic(info: &PanicInfo) -> ! {
|
||||
donald::test_panic_handler(info)
|
||||
}
|
||||
|
||||
use donald::println;
|
||||
|
||||
#[test_case]
|
||||
fn test_println() {
|
||||
println!("test_println output");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue