()
| 60 | #[test] |
| 61 | #[cfg(all(not(feature = "std"), feature = "anyhow"))] |
| 62 | fn anyhow_nostd() { |
| 63 | let anyhow: Result<(), _> = Err(anyhow::anyhow!(RootError) |
| 64 | .context(PrintableA(0)) |
| 65 | .context(PrintableB(0))); |
| 66 | |
| 67 | let report = anyhow |
| 68 | .into_report() |
| 69 | .expect_err("should have returned error"); |
| 70 | let expected_output = ["Location", "printable B"]; |
| 71 | for (anyhow, expected) in messages(&report).into_iter().zip(expected_output) { |
| 72 | assert_eq!(anyhow, expected); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | #[test] |
| 77 | #[cfg(all(nightly, feature = "backtrace", feature = "anyhow"))] |
nothing calls this directly
no test coverage detected