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

Function test_read

avro/examples/test_interop_single_object_encoding.rs:75–84  ·  view source on GitHub ↗
(mut encoded: &[u8])

Source from the content-addressed store, hash-verified

73}
74
75fn test_read(mut encoded: &[u8]) {
76 let read_message = apache_avro::GenericSingleObjectReader::builder()
77 .schema(InteropMessage::get_schema())
78 .build()
79 .expect("Resolving failed")
80 .read_value(&mut encoded)
81 .expect("Decoding failed");
82 let expected_value: Value = InteropMessage.into();
83 assert_eq!(expected_value, read_message);
84}

Callers 1

mainFunction · 0.85

Calls 3

buildMethod · 0.80
schemaMethod · 0.80
read_valueMethod · 0.45

Tested by

no test coverage detected