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

Method CheckImport

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

Source from the content-addressed store, hash-verified

2806 }
2807
2808 void CheckImport(const std::shared_ptr<Array>& expected) {
2809 ArrayReleaseCallback cb(&c_struct_);
2810
2811 auto type = expected->type();
2812 ASSERT_OK_AND_ASSIGN(auto array, ImportArray(&c_struct_, type));
2813 ASSERT_TRUE(ArrowArrayIsReleased(&c_struct_)); // was moved
2814 Reset(); // for further tests
2815
2816 ASSERT_OK(array->ValidateFull());
2817 // Special case: arrays without data (such as Null arrays) needn't keep
2818 // the ArrowArray struct alive.
2819 if (HasData(&c_struct_)) {
2820 cb.AssertNotCalled();
2821 }
2822 AssertArraysEqual(*expected, *array, true);
2823 array.reset();
2824 cb.AssertCalled();
2825 }
2826
2827 void CheckImport(const std::shared_ptr<RecordBatch>& expected) {
2828 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