()
| 213 | |
| 214 | #[test] |
| 215 | fn test_write_or_recover_normal() { |
| 216 | let lock = std::sync::RwLock::new(42); |
| 217 | let mut guard = write_or_recover(&lock); |
| 218 | *guard = 99; |
| 219 | drop(guard); |
| 220 | assert_eq!(*read_or_recover(&lock), 99); |
| 221 | } |
| 222 | |
| 223 | #[test] |
| 224 | fn test_read_or_recover_poisoned() { |
nothing calls this directly
no test coverage detected