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

Function add_single

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

Source from the content-addressed store, hash-verified

414
415 #[test]
416 fn add_single() {
417 let mut sink = ReportSink::new();
418
419 sink.append(Report::new(TestError(0)));
420
421 let report = sink.finish().expect_err("should have failed");
422
423 let contexts: BTreeSet<_> = report.current_contexts().collect();
424 assert_eq!(contexts.len(), 1);
425 assert!(contexts.contains(&TestError(0)));
426 }
427
428 #[test]
429 fn add_multiple() {

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