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

Function anyhow_nostd

libs/error-stack/tests/test_compatibility.rs:62–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60#[test]
61#[cfg(all(not(feature = "std"), feature = "anyhow"))]
62fn anyhow_nostd() {
63 let anyhow: Result<(), _> = Err(anyhow::anyhow!(RootError)
64 .context(PrintableA(0))
65 .context(PrintableB(0)));
66
67 let report = anyhow
68 .into_report()
69 .expect_err("should have returned error");
70 let expected_output = ["Location", "printable B"];
71 for (anyhow, expected) in messages(&report).into_iter().zip(expected_output) {
72 assert_eq!(anyhow, expected);
73 }
74}
75
76#[test]
77#[cfg(all(nightly, feature = "backtrace", feature = "anyhow"))]

Callers

nothing calls this directly

Calls 8

ErrInterface · 0.85
PrintableAClass · 0.85
PrintableBClass · 0.85
messagesFunction · 0.85
zipMethod · 0.80
contextMethod · 0.45
into_reportMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected