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

Function test_reader_stream

src/avro/src/reader.rs:1044–1061  ·  view source on GitHub ↗

unsupported operation: inline assembly is not supported

()

Source from the content-addressed store, hash-verified

1042 #[mz_ore::test]
1043 #[cfg_attr(miri, ignore)] // unsupported operation: inline assembly is not supported
1044 fn test_reader_stream() {
1045 let schema: Schema = SCHEMA.parse().unwrap();
1046 let reader = Reader::with_schema(&schema, ENCODED).unwrap();
1047
1048 let mut record1 = Record::new(schema.top_node()).unwrap();
1049 record1.put("a", 27i64);
1050 record1.put("b", "foo");
1051
1052 let mut record2 = Record::new(schema.top_node()).unwrap();
1053 record2.put("a", 42i64);
1054 record2.put("b", "bar");
1055
1056 let expected = [record1.avro(), record2.avro()];
1057
1058 for (i, value) in reader.enumerate() {
1059 assert_eq!(value.unwrap(), expected[i]);
1060 }
1061 }
1062
1063 #[mz_ore::test]
1064 fn test_reader_invalid_header() {

Callers

nothing calls this directly

Calls 6

unwrapMethod · 0.80
top_nodeMethod · 0.80
putMethod · 0.80
enumerateMethod · 0.80
parseMethod · 0.45
avroMethod · 0.45

Tested by

no test coverage detected