MCPcopy Create free account
hub / github.com/hashintel/hash / capture_multiple

Function capture_multiple

libs/error-stack/src/sink.rs:457–469  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

455
456 #[test]
457 fn capture_multiple() {
458 let mut sink = ReportSink::new();
459
460 sink.capture(TestError(0));
461 sink.capture(TestError(1));
462
463 let report = sink.finish().expect_err("should have failed");
464
465 let contexts: BTreeSet<_> = report.current_contexts().collect();
466 assert_eq!(contexts.len(), 2);
467 assert!(contexts.contains(&TestError(0)));
468 assert!(contexts.contains(&TestError(1)));
469 }
470
471 #[test]
472 fn new_does_not_panic() {

Callers

nothing calls this directly

Calls 5

collectMethod · 0.80
current_contextsMethod · 0.80
TestErrorClass · 0.70
captureMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected