| 2798 | } |
| 2799 | |
| 2800 | void CheckImport(const std::shared_ptr<Array>& expected) { |
| 2801 | ArrayReleaseCallback cb(&c_struct_); |
| 2802 | |
| 2803 | auto type = expected->type(); |
| 2804 | ASSERT_OK_AND_ASSIGN(auto array, ImportArray(&c_struct_, type)); |
| 2805 | ASSERT_TRUE(ArrowArrayIsReleased(&c_struct_)); // was moved |
| 2806 | Reset(); // for further tests |
| 2807 | |
| 2808 | ASSERT_OK(array->ValidateFull()); |
| 2809 | // Special case: arrays without data (such as Null arrays) needn't keep |
| 2810 | // the ArrowArray struct alive. |
| 2811 | if (HasData(&c_struct_)) { |
| 2812 | cb.AssertNotCalled(); |
| 2813 | } |
| 2814 | AssertArraysEqual(*expected, *array, true); |
| 2815 | array.reset(); |
| 2816 | cb.AssertCalled(); |
| 2817 | } |
| 2818 | |
| 2819 | void CheckImport(const std::shared_ptr<RecordBatch>& expected) { |
| 2820 | ArrayReleaseCallback cb(&c_struct_); |
nothing calls this directly
no test coverage detected