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

Function add_multiple

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

Source from the content-addressed store, hash-verified

427
428 #[test]
429 fn add_multiple() {
430 let mut sink = ReportSink::new();
431
432 sink.append(Report::new(TestError(0)));
433 sink.append(Report::new(TestError(1)));
434
435 let report = sink.finish().expect_err("should have failed");
436
437 let contexts: BTreeSet<_> = report.current_contexts().collect();
438 assert_eq!(contexts.len(), 2);
439 assert!(contexts.contains(&TestError(0)));
440 assert!(contexts.contains(&TestError(1)));
441 }
442
443 #[test]
444 fn capture_single() {

Callers

nothing calls this directly

Calls 5

collectMethod · 0.80
current_contextsMethod · 0.80
TestErrorClass · 0.70
appendMethod · 0.65
finishMethod · 0.45

Tested by

no test coverage detected