MCPcopy Create free account
hub / github.com/apache/arrow / CheckImport

Method CheckImport

cpp/src/arrow/c/bridge_test.cc:2800–2817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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_);

Callers

nothing calls this directly

Calls 11

ArrowArrayIsReleasedFunction · 0.85
HasDataFunction · 0.85
AssertArraysEqualFunction · 0.85
AssertBatchesEqualFunction · 0.85
AssertNotCalledMethod · 0.80
AssertCalledMethod · 0.80
ResetFunction · 0.50
typeMethod · 0.45
ValidateFullMethod · 0.45
resetMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected