MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_decode_wrong_magic

Function test_decode_wrong_magic

atomic-agent/src/envelope.rs:753–761  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

751
752 #[test]
753 fn test_decode_wrong_magic() {
754 let err = SessionEnvelope::decode(b"XXXXmore data here").unwrap_err();
755 match err {
756 AgentError::EnvelopeCodecError { reason } => {
757 assert!(reason.contains("invalid magic"));
758 }
759 other => panic!("Expected EnvelopeCodecError, got: {:?}", other),
760 }
761 }
762
763 #[test]
764 fn test_decode_unsupported_version() {

Callers

nothing calls this directly

Calls 1

decodeFunction · 0.85

Tested by

no test coverage detected