mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-24 04:03:52 +03:00
fix(core): state tests (#11116)
This commit is contained in:
parent
dfba0ede68
commit
9af08f93e4
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user