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

Function complex

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

Source from the content-addressed store, hash-verified

410
411 #[test]
412 fn complex() {
413 let _guard = prepare(false);
414
415 let mut report = create_report().attach(PrintableA(0)).expand();
416 report.append({
417 let mut report = create_report().attach(PrintableB(1)).expand();
418
419 report.push(
420 create_report()
421 .attach_opaque(AttachmentB(0))
422 .attach_opaque(AttachmentA(1))
423 .attach(PrintableB(1)),
424 );
425
426 report.attach_opaque(AttachmentA(2)).attach("Test")
427 });
428
429 // force the generation of a tree node
430 let report = report.change_context(ContextA(2)).attach(PrintableA(2));
431
432 assert_snapshot!(format!("{report:?}"));
433 }
434
435 #[test]
436 fn hook() {

Callers

nothing calls this directly

Calls 13

PrintableAClass · 0.85
PrintableBClass · 0.85
AttachmentBClass · 0.85
AttachmentAClass · 0.85
ContextAClass · 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