()
| 82 | |
| 83 | #[test] |
| 84 | fn new() { |
| 85 | let mut error = Error::new(TestError(42)); |
| 86 | assert!(error.is::<TestError>()); |
| 87 | assert_eq!(error.downcast_ref::<TestError>().unwrap().0, 42); |
| 88 | error.downcast_mut::<TestError>().unwrap().0 += 1; |
| 89 | assert_eq!(error.downcast_ref::<TestError>().unwrap().0, 43); |
| 90 | } |
| 91 | |
| 92 | #[test] |
| 93 | fn new_drops() { |
no test coverage detected