GH-41738: Test the underlying buffer capacity is sufficient to hold the requested vector.
| 38 | // GH-41738: Test the underlying buffer capacity is sufficient to hold the requested |
| 39 | // vector. |
| 40 | TEST_F(TempVectorStackTest, BufferCapacitySufficiency) { |
| 41 | for (uint32_t stack_size : {1, 7, 8, 63, 64, 65535, 65536}) { |
| 42 | ARROW_SCOPED_TRACE("stack_size = ", stack_size); |
| 43 | TempVectorStack stack; |
| 44 | ASSERT_OK(stack.Init(default_memory_pool(), stack_size)); |
| 45 | |
| 46 | TempVectorHolder<uint8_t> v(&stack, stack_size); |
| 47 | ASSERT_LE(v.mutable_data() + stack_size, BufferData(stack) + BufferCapacity(stack)); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | } // namespace util |
| 52 | } // namespace arrow |
nothing calls this directly
no test coverage detected