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

Function test_write

avro/examples/test_interop_single_object_encoding.rs:66–73  ·  view source on GitHub ↗
(expected: &[u8])

Source from the content-addressed store, hash-verified

64}
65
66fn test_write(expected: &[u8]) {
67 let mut encoded: Vec<u8> = Vec::new();
68 apache_avro::SpecificSingleObjectWriter::<InteropMessage>::new()
69 .expect("Resolving failed")
70 .write_value(InteropMessage, &mut encoded)
71 .expect("Encoding failed");
72 assert_eq!(expected, &encoded);
73}
74
75fn test_read(mut encoded: &[u8]) {
76 let read_message = apache_avro::GenericSingleObjectReader::builder()

Callers 1

mainFunction · 0.85

Calls 1

write_valueMethod · 0.45

Tested by

no test coverage detected