#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u32)]
pub enum TestStatus {
InBootRom = bindgen::test_status::test_status_kTestStatusInBootRom,
InBootRomHalt = bindgen::test_status::test_status_kTestStatusInBootRomHalt,
InTest = bindgen::test_status::test_status_kTestStatusInTest,
InWfi = bindgen::test_status::test_status_kTestStatusInWfi,
Passed = bindgen::test_status::test_status_kTestStatusPassed,
Failed = bindgen::test_status::test_status_kTestStatusFailed,
}
impl TestStatus {
pub fn wait_pattern(&self) -> String {
match self {
TestStatus::Passed => "PASS!".into(),
TestStatus::Failed => "FAIL!".into(),
x => format!("test_status_set to 0x{:x}", *x as u32),
}
}
}