MCPcopy Create free account
hub / github.com/consensus-shipyard/ipc / test_parse_error_not_found

Function test_parse_error_not_found

contract-bindings/src/error_parser.rs:270–281  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

268
269 #[test]
270 fn test_parse_error_not_found() {
271 // a random error selector that definitely doesn't exist
272 let err_bytes = const_hex::decode("ffffffff").unwrap();
273
274 let result = ContractErrorParser::parse_from_bytes(err_bytes.as_ref());
275 assert!(result.is_err());
276 if let Err(ParseContractError::ErrorNotFound { selector }) = result {
277 assert_eq!(selector, "ffffffff");
278 } else {
279 panic!("Expected ErrorNotFound error");
280 }
281 }
282
283 #[test]
284 fn test_legacy_compatibility() {

Callers

nothing calls this directly

Calls 1

as_refMethod · 0.45

Tested by

no test coverage detected