()
| 402 | |
| 403 | #[test] |
| 404 | fn test_encode_empty_map() { |
| 405 | let mut buf = Vec::new(); |
| 406 | let empty: HashMap<String, Value> = HashMap::new(); |
| 407 | encode( |
| 408 | &Value::Map(empty.clone()), |
| 409 | &Schema::map(Schema::Int).build(), |
| 410 | &mut buf, |
| 411 | ) |
| 412 | .expect(&success( |
| 413 | &Value::Map(empty), |
| 414 | &Schema::map(Schema::Int).build(), |
| 415 | )); |
| 416 | assert_eq!(vec![0u8], buf); |
| 417 | } |
| 418 | |
| 419 | #[test] |
| 420 | fn test_avro_3433_recursive_definition_encode_record() { |