diff --git a/stdlib/src/sync.rs b/stdlib/src/sync.rs index 5336bea9..bdb50b9e 100644 --- a/stdlib/src/sync.rs +++ b/stdlib/src/sync.rs @@ -114,3 +114,15 @@ impl StdlibRegistry { ); } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_script_mutex_new() { + let mutex = ScriptMutex::new(); + let guard = mutex.locked.lock().unwrap(); + assert_eq!(*guard, false); + } +}