()
| 1025 | |
| 1026 | #[mz_ore::test] |
| 1027 | fn test_null_union() { |
| 1028 | let schema: Schema = UNION_SCHEMA.parse().unwrap(); |
| 1029 | let mut encoded: &'static [u8] = &[2, 0]; |
| 1030 | |
| 1031 | assert_eq!( |
| 1032 | from_avro_datum(&schema, &mut encoded).unwrap(), |
| 1033 | Value::Union { |
| 1034 | index: 1, |
| 1035 | inner: Box::new(Value::Long(0)), |
| 1036 | n_variants: 2, |
| 1037 | null_variant: Some(0) |
| 1038 | } |
| 1039 | ); |
| 1040 | } |
| 1041 | |
| 1042 | #[mz_ore::test] |
| 1043 | #[cfg_attr(miri, ignore)] // unsupported operation: inline assembly is not supported |