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

Function test_decode_too_short

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

Source from the content-addressed store, hash-verified

717
718 #[test]
719 fn test_decode_too_short() {
720 // Just magic, no payload
721 let err = SessionEnvelope::decode(b"ATSE").unwrap_err();
722 match err {
723 AgentError::EnvelopeCodecError { reason } => {
724 assert!(reason.contains("too short"));
725 }
726 other => panic!("Expected EnvelopeCodecError, got: {:?}", other),
727 }
728 }
729
730 #[test]
731 fn test_decode_empty() {

Callers

nothing calls this directly

Calls 1

decodeFunction · 0.85

Tested by

no test coverage detected