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

Function capture_single

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

Source from the content-addressed store, hash-verified

442
443 #[test]
444 fn capture_single() {
445 let mut sink = ReportSink::new();
446
447 sink.capture(TestError(0));
448
449 let report = sink.finish().expect_err("should have failed");
450
451 let contexts: BTreeSet<_> = report.current_contexts().collect();
452 assert_eq!(contexts.len(), 1);
453 assert!(contexts.contains(&TestError(0)));
454 }
455
456 #[test]
457 fn capture_multiple() {

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