()
| 387 | |
| 388 | #[test] |
| 389 | fn multiple_strings_roundtrip() { |
| 390 | let strings: Vec<&[u8]> = vec![ |
| 391 | b"us-east-1", |
| 392 | b"us-east-2", |
| 393 | b"us-west-1", |
| 394 | b"eu-west-1", |
| 395 | b"us-east-1", |
| 396 | b"us-east-1", |
| 397 | ]; |
| 398 | let encoded = encode(&strings); |
| 399 | let decoded = decode(&encoded).unwrap(); |
| 400 | assert_eq!(decoded.len(), strings.len()); |
| 401 | for (a, b) in strings.iter().zip(decoded.iter()) { |
| 402 | assert_eq!(*a, b.as_slice()); |
| 403 | } |
| 404 | } |
| 405 | |
| 406 | #[test] |
| 407 | fn repetitive_log_lines() { |