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

Function test_encode_empty_array

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

Source from the content-addressed store, hash-verified

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

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