From 552c206473fb1229ece76415c1de5aa6ef627ad0 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2026 08:07:44 +0000 Subject: [PATCH] Add test for ScriptMutex::new Added a test to ensure the ScriptMutex::new constructor correctly initializes the locked state to false. Co-authored-by: Tcode-Motion <188012755+Tcode-Motion@users.noreply.github.com> --- stdlib/src/sync.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/stdlib/src/sync.rs b/stdlib/src/sync.rs index 5336bea9..9862b3ea 100644 --- a/stdlib/src/sync.rs +++ b/stdlib/src/sync.rs @@ -114,3 +114,14 @@ impl StdlibRegistry { ); } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_script_mutex_new() { + let mutex = ScriptMutex::new(); + assert_eq!(*mutex.locked.lock().unwrap(), false); + } +}