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

Function test_reader_invalid_block

src/avro/src/reader.rs:1072–1087  ·  view source on GitHub ↗

unsupported operation: inline assembly is not supported

()

Source from the content-addressed store, hash-verified

1070 #[mz_ore::test]
1071 #[cfg_attr(miri, ignore)] // unsupported operation: inline assembly is not supported
1072 fn test_reader_invalid_block() {
1073 let schema: Schema = SCHEMA.parse().unwrap();
1074 let invalid = ENCODED
1075 .iter()
1076 .rev()
1077 .skip(19)
1078 .copied()
1079 .collect::<Vec<u8>>()
1080 .into_iter()
1081 .rev()
1082 .collect::<Vec<u8>>();
1083 let reader = Reader::with_schema(&schema, &invalid[..]).unwrap();
1084 for value in reader {
1085 assert_err!(value);
1086 }
1087 }
1088
1089 #[mz_ore::test]
1090 fn test_reader_empty_buffer() {

Callers

nothing calls this directly

Calls 5

unwrapMethod · 0.80
parseMethod · 0.45
into_iterMethod · 0.45
skipMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected