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

Function sources_transparent

libs/error-stack/tests/test_debug.rs:388–409  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

386 /// context, are still handled gracefully.
387 #[test]
388 fn sources_transparent() {
389 let _guard = prepare(false);
390
391 let report = {
392 let mut report = create_report().attach(PrintableA(1)).expand();
393
394 report.append({
395 let mut report = create_report().attach(PrintableB(2)).expand();
396
397 report.push(create_report().attach(PrintableB(3)));
398
399 report.attach(PrintableA(4))
400 });
401
402 report
403 .attach_opaque(AttachmentA(1))
404 .change_context(ContextA(2))
405 .attach_opaque(AttachmentB(2))
406 };
407
408 assert_snapshot!(format!("{report:?}"));
409 }
410
411 #[test]
412 fn complex() {

Callers

nothing calls this directly

Calls 13

PrintableAClass · 0.85
PrintableBClass · 0.85
AttachmentAClass · 0.85
ContextAClass · 0.85
AttachmentBClass · 0.85
expandMethod · 0.80
prepareFunction · 0.70
create_reportFunction · 0.70
appendMethod · 0.65
pushMethod · 0.65
attachMethod · 0.45
attach_opaqueMethod · 0.45

Tested by

no test coverage detected