()
| 386 | |
| 387 | #[test] |
| 388 | fn test_encode_empty_array() { |
| 389 | let mut buf = Vec::new(); |
| 390 | let empty: Vec<Value> = Vec::new(); |
| 391 | encode( |
| 392 | &Value::Array(empty.clone()), |
| 393 | &Schema::array(Schema::Int).build(), |
| 394 | &mut buf, |
| 395 | ) |
| 396 | .expect(&success( |
| 397 | &Value::Array(empty), |
| 398 | &Schema::array(Schema::Int).build(), |
| 399 | )); |
| 400 | assert_eq!(vec![0u8], buf); |
| 401 | } |
| 402 | |
| 403 | #[test] |
| 404 | fn test_encode_empty_map() { |