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

Function test_validate_offsets_i32

arrow/tests/array_validation.rs:196–208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194#[test]
195#[should_panic(expected = "Buffer 0 of Utf8 isn't large enough. Expected 12 bytes got 8")]
196fn test_validate_offsets_i32() {
197 let data_buffer = Buffer::from_slice_ref("abcdef".as_bytes());
198 let offsets_buffer = Buffer::from_slice_ref([0i32, 2i32]);
199 ArrayData::try_new(
200 DataType::Utf8,
201 2,
202 None,
203 0,
204 vec![offsets_buffer, data_buffer],
205 vec![],
206 )
207 .unwrap();
208}
209
210#[test]
211#[should_panic(expected = "Buffer 0 of LargeUtf8 isn't large enough. Expected 24 bytes got 16")]

Callers

nothing calls this directly

Calls 2

try_newFunction · 0.85
as_bytesMethod · 0.45

Tested by

no test coverage detected