| 2776 | } |
| 2777 | |
| 2778 | void CheckImport(const std::shared_ptr<Array>& expected) { |
| 2779 | ArrayReleaseCallback cb(&c_struct_); |
| 2780 | |
| 2781 | auto type = expected->type(); |
| 2782 | ASSERT_OK_AND_ASSIGN(auto array, ImportArray(&c_struct_, type)); |
| 2783 | ASSERT_TRUE(ArrowArrayIsReleased(&c_struct_)); // was moved |
| 2784 | Reset(); // for further tests |
| 2785 | |
| 2786 | ASSERT_OK(array->ValidateFull()); |
| 2787 | // Special case: arrays without data (such as Null arrays) needn't keep |
| 2788 | // the ArrowArray struct alive. |
| 2789 | if (HasData(&c_struct_)) { |
| 2790 | cb.AssertNotCalled(); |
| 2791 | } |
| 2792 | AssertArraysEqual(*expected, *array, true); |
| 2793 | array.reset(); |
| 2794 | cb.AssertCalled(); |
| 2795 | } |
| 2796 | |
| 2797 | void CheckImport(const std::shared_ptr<RecordBatch>& expected) { |
| 2798 | ArrayReleaseCallback cb(&c_struct_); |
nothing calls this directly
no test coverage detected