asterinas/tests/test_example.rs

24 lines
453 B
Rust
Raw Normal View History

2022-09-01 06:25:26 +00:00
#![no_std]
#![no_main]
#![feature(custom_test_frameworks)]
#![test_runner(jinux_frame::test_runner)]
2022-09-01 06:25:26 +00:00
#![reexport_test_harness_main = "test_main"]
use core::panic::PanicInfo;
#[no_mangle]
pub fn jinux_main() -> ! {
jinux_frame::init();
2022-09-01 06:25:26 +00:00
test_main();
loop {}
}
#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
jinux_frame::test_panic_handler(info)
2022-09-01 06:25:26 +00:00
}
#[test_case]
fn test_println() {
jinux_frame::println!("test_println output");
2022-09-01 06:25:26 +00:00
}