use rhai::{Engine, EvalAltResult}; #[test] fn test_not() -> Result<(), Box> { let engine = Engine::new(); assert!(!engine .eval::("let not_true = !true; not_true") .unwrap()); #[cfg(not(feature = "no_function"))] assert!(engine.eval::("fn not(x) { !x } not(false)").unwrap()); assert!(engine.eval::("!!!!true").unwrap()); Ok(()) }