MCPcopy Create free account
hub / github.com/apache/avro-rs / test_encode_empty_map

Function test_encode_empty_map

avro/src/encode.rs:404–417  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 4

encodeFunction · 0.85
successFunction · 0.85
buildMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected