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

Function hook_decr

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

Source from the content-addressed store, hash-verified

492
493 #[test]
494 fn hook_decr() {
495 let _guard = prepare(false);
496
497 let report = create_report() //
498 .attach_opaque(1_u32)
499 .attach_opaque(2_u32)
500 .attach_opaque(3_u32);
501
502 Report::install_debug_hook::<u32>(|_, context| {
503 let idx = context.decrement_counter();
504 context.push_body(idx.to_string());
505 });
506
507 assert_snapshot!(format!("{report:?}"));
508 }
509
510 #[test]
511 fn hook_incr() {

Callers

nothing calls this directly

Calls 4

push_bodyMethod · 0.80
prepareFunction · 0.70
create_reportFunction · 0.70
attach_opaqueMethod · 0.45

Tested by

no test coverage detected