From cd685e79c7516efbfaacd795d820307489d0fcdd Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Sun, 3 Apr 2022 19:18:53 -0700 Subject: [PATCH] Add some doc clarifications for the test framework --- src/test_utils.rs | 4 ++++ 1 file changed, 4 insertions(+) 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 {