From 0e57576b6a725e7eeadd151b283bf27417eb4a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Autin?= Date: Mon, 13 Mar 2023 15:09:46 +0100 Subject: [PATCH] Added single unit test necessary for system --- src/kernel/system.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/kernel/system.rs b/src/kernel/system.rs index bad8652..413da86 100644 --- a/src/kernel/system.rs +++ b/src/kernel/system.rs @@ -60,4 +60,26 @@ pub enum ObjectType { FileType, ThreadType, InvalidType +} + +#[cfg(test)] +mod tests { + + use crate::{System, Machine}; + + macro_rules! init_system { + () => {{ + let m = Machine::init_machine(); + init_system!(m) + }}; + ($a:expr) => {{ + System::new($a) + }}; + } + + #[test] + fn test_init_system() { + init_system!(); + } + } \ No newline at end of file