()
| 51 | |
| 52 | #[test] |
| 53 | fn error_chain() -> Result<()> { |
| 54 | OomTest::new().test(|| { |
| 55 | let error = Error::msg("hello"); |
| 56 | let error = error.context("goodbye"); |
| 57 | for _ in error.chain() { |
| 58 | // Nothing to do here, just exercising the iteration. |
| 59 | } |
| 60 | ok_if_not_oom(error) |
| 61 | }) |
| 62 | } |
| 63 | |
| 64 | struct Null; |
| 65 | impl Write for Null { |