()
| 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() { |