From 145006b4000f9b4dffb4e69c6f95cd87023ff246 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Fri, 27 Nov 2020 23:51:54 +0200 Subject: [PATCH] wip caps --- nucleus/src/arch/aarch64/caps.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nucleus/src/arch/aarch64/caps.rs b/nucleus/src/arch/aarch64/caps.rs index ca7b2ff..2d4a056 100644 --- a/nucleus/src/arch/aarch64/caps.rs +++ b/nucleus/src/arch/aarch64/caps.rs @@ -532,5 +532,12 @@ mod tests { // use super::*; #[test_case] - fn first_capability_derivation_has_no_prev_link() {} + fn first_capability_derivation_has_no_prev_link() { + let entry = CapTableEntry::empty(); + assert_eq!(entry.derivation_node.try_get_prev(), Err(DerivationTreeError::InvalidPrev)); + } } + +// @todo Use bitmatch over cap Type field? +// Could be interesting if usable. See https://github.com/porglezomp/bitmatch +// Maybe look at https://lib.rs/crates/enumflags2 too