diff --git a/src/test_utils.rs b/src/test_utils.rs index 63142f4..6411707 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -10,6 +10,9 @@ fn panic(info: &PanicInfo) -> ! { loop {} } +/// This function is hooked up to the #![test_runner] attribute made possible by the +/// https://doc.rust-lang.org/unstable-book/language-features/custom-test-frameworks.html unstable +/// feature. cf. https://os.phil-opp.com/testing/ pub fn test_runner(tests: &[&dyn TestFunction]) { serial_println!("Running {} test(s)", tests.len()); for test in tests { @@ -34,6 +37,7 @@ where } } +/// Exits qemu by writing to a special qemu emulated port. pub fn exit_qemu(exit_code: QemuExitCode) { use x86_64::instructions::port::Port; unsafe {