fix(core): state tests (#11116)

This commit is contained in:
Lucas Fernandes Nogueira 2024-09-24 12:09:34 -03:00 committed by GitHub
parent dfba0ede68
commit 9af08f93e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -197,8 +197,8 @@ mod tests {
let state = StateManager::new(); let state = StateManager::new();
assert!(state.set(1u32)); assert!(state.set(1u32));
assert_eq!(*state.get::<u32>(), 1); assert_eq!(*state.get::<u32>(), 1);
assert!(state.unmanage::<u32>()); assert!(state.unmanage::<u32>().is_some());
assert!(!state.unmanage::<u32>()); assert!(state.unmanage::<u32>().is_none());
assert_eq!(state.try_get::<u32>(), None); assert_eq!(state.try_get::<u32>(), None);
assert!(state.set(2u32)); assert!(state.set(2u32));
assert_eq!(*state.get::<u32>(), 2); assert_eq!(*state.get::<u32>(), 2);