Add some doc clarifications for the test framework

This commit is contained in:
Greg Shuflin 2022-04-03 19:18:53 -07:00
parent ad88a0784b
commit cd685e79c7

View File

@ -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 {