()
| 740 | |
| 741 | #[test] |
| 742 | fn test_decode_three_bytes() { |
| 743 | let err = SessionEnvelope::decode(b"ATS").unwrap_err(); |
| 744 | match err { |
| 745 | AgentError::EnvelopeCodecError { reason } => { |
| 746 | assert!(reason.contains("too short")); |
| 747 | } |
| 748 | other => panic!("Expected EnvelopeCodecError, got: {:?}", other), |
| 749 | } |
| 750 | } |
| 751 | |
| 752 | #[test] |
| 753 | fn test_decode_wrong_magic() { |