(
datums: Vec<Vec<Datum<'a>>>,
)
| 4027 | #[mz_ore::test] |
| 4028 | fn test_range_errors() { |
| 4029 | fn test_range_errors_inner<'a>( |
| 4030 | datums: Vec<Vec<Datum<'a>>>, |
| 4031 | ) -> Result<(), InvalidRangeError> { |
| 4032 | let mut row = Row::default(); |
| 4033 | let row_len = row.byte_len(); |
| 4034 | let mut packer = row.packer(); |
| 4035 | let r = packer.push_range_with( |
| 4036 | RangeLowerBound { |
| 4037 | inclusive: true, |
| 4038 | bound: Some(|row: &mut RowPacker| { |
| 4039 | for d in &datums[0] { |
| 4040 | row.push(d); |
| 4041 | } |
| 4042 | Ok(()) |
| 4043 | }), |
| 4044 | }, |
| 4045 | RangeUpperBound { |
| 4046 | inclusive: true, |
| 4047 | bound: Some(|row: &mut RowPacker| { |
| 4048 | for d in &datums[1] { |
| 4049 | row.push(d); |
| 4050 | } |
| 4051 | Ok(()) |
| 4052 | }), |
| 4053 | }, |
| 4054 | ); |
| 4055 | |
| 4056 | assert_eq!(row_len, row.byte_len()); |
| 4057 | |
| 4058 | r |
| 4059 | } |
| 4060 | |
| 4061 | // A finite bound whose closure pushes zero values violates the |
| 4062 | // `push_range_with` caller contract and still panics. This is |
no test coverage detected