MCPcopy Create free account
hub / github.com/apache/arrow-rs / test_unaligned

Function test_unaligned

arrow-buffer/src/buffer/scalar.rs:312–317  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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")]

Callers

nothing calls this directly

Calls 3

from_iterFunction · 0.70
iterMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected