1 use super::{Key, StaticKey};
3 fn assert_sync<T: Sync>() {}
4 fn assert_send<T: Send>() {}
11 let k1 = Key::new(None);
12 let k2 = Key::new(None);
13 assert!(k1.get().is_null());
14 assert!(k2.get().is_null());
17 assert_eq!(k1.get() as usize, 1);
18 assert_eq!(k2.get() as usize, 2);
23 static K1: StaticKey = StaticKey::new(None);
24 static K2: StaticKey = StaticKey::new(None);
27 assert!(K1.get().is_null());
28 assert!(K2.get().is_null());
31 assert_eq!(K1.get() as usize, 1);
32 assert_eq!(K2.get() as usize, 2);