()
| 729 | |
| 730 | #[test] |
| 731 | fn test_decode_empty() { |
| 732 | let err = SessionEnvelope::decode(b"").unwrap_err(); |
| 733 | match err { |
| 734 | AgentError::EnvelopeCodecError { reason } => { |
| 735 | assert!(reason.contains("too short")); |
| 736 | } |
| 737 | other => panic!("Expected EnvelopeCodecError, got: {:?}", other), |
| 738 | } |
| 739 | } |
| 740 | |
| 741 | #[test] |
| 742 | fn test_decode_three_bytes() { |