()
| 310 | #[test] |
| 311 | #[should_panic(expected = "Memory pointer is not aligned with the specified scalar type")] |
| 312 | fn test_unaligned() { |
| 313 | let expected = [0_i32, 1, 2]; |
| 314 | let buffer = Buffer::from_iter(expected.iter().cloned()); |
| 315 | let buffer = buffer.slice(1); |
| 316 | ScalarBuffer::<i32>::new(buffer, 0, 2); |
| 317 | } |
| 318 | |
| 319 | #[test] |
| 320 | #[should_panic(expected = "the offset of the new Buffer cannot exceed the existing length")] |