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

Method CheckImport

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

Source from the content-addressed store, hash-verified

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

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