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

Function test_binary_int_encoding

avro/tests/io.rs:248–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

246 for (number, hex_encoding) in binary_encodings().iter() {
247 let encoded = GenericDatumWriter::builder(&Schema::Int)
248 .build()?
249 .write_value_to_vec(Value::Int(*number as i32))?;
250 assert_eq!(&encoded, hex_encoding);
251 }
252
253 Ok(())
254}
255
256#[test]
257fn test_binary_long_encoding() -> TestResult {
258 for (number, hex_encoding) in binary_encodings().iter() {
259 let encoded = GenericDatumWriter::builder(&Schema::Long)
260 .build()?

Callers

nothing calls this directly

Calls 3

binary_encodingsFunction · 0.85
write_value_to_vecMethod · 0.80
buildMethod · 0.80

Tested by

no test coverage detected