MCPcopy Create free account
hub / github.com/argumentcomputer/ix / display_unknown_const

Function display_unknown_const

crates/kernel/src/error.rs:184–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

182
183 #[test]
184 fn display_unknown_const() {
185 let addr = Address::hash(b"some-constant");
186 let e: TcError<Anon> = TcError::UnknownConst(addr.clone());
187 let s = format!("{e}");
188 assert!(s.starts_with("unknown constant"));
189 // The display uses `{:.12}` — precision truncates the hex. Verify the
190 // first 12 chars of the hex appear.
191 let hex = addr.hex();
192 assert!(s.contains(&hex[..12]));
193 }
194
195 #[test]
196 fn display_univ_param_mismatch() {

Callers

nothing calls this directly

Calls 2

hexMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected