MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / test_encode_empty_array

Function test_encode_empty_array

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

Source from the content-addressed store, hash-verified

186
187 #[mz_ore::test]
188 fn test_encode_empty_array() {
189 let mut buf = Vec::new();
190 let empty: Vec<Value> = Vec::new();
191 encode(
192 &Value::Array(empty),
193 &r#"{"type": "array", "items": "int"}"#.parse().unwrap(),
194 &mut buf,
195 );
196 assert_eq!(vec![0u8], buf);
197 }
198
199 #[mz_ore::test]
200 fn test_encode_empty_map() {

Callers

nothing calls this directly

Calls 4

ArrayClass · 0.85
unwrapMethod · 0.80
encodeFunction · 0.70
parseMethod · 0.45

Tested by

no test coverage detected