()
| 509 | #[cfg(nightly)] |
| 510 | #[test] |
| 511 | fn try_multiple() { |
| 512 | fn sink() -> Result<(), Report<[TestError]>> { |
| 513 | let mut sink = ReportSink::new(); |
| 514 | |
| 515 | sink.append(Report::new(TestError(0))); |
| 516 | sink.append(Report::new(TestError(1))); |
| 517 | |
| 518 | sink?; |
| 519 | Ok(()) |
| 520 | } |
| 521 | |
| 522 | let report = sink().expect_err("should have failed"); |
| 523 | |
| 524 | let contexts: BTreeSet<_> = report.current_contexts().collect(); |
| 525 | assert_eq!(contexts.len(), 2); |
| 526 | assert!(contexts.contains(&TestError(0))); |
| 527 | assert!(contexts.contains(&TestError(1))); |
| 528 | } |
| 529 | |
| 530 | #[cfg(nightly)] |
| 531 | #[test] |
nothing calls this directly
no test coverage detected