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

Method TestSliced

cpp/src/arrow/array/array_binary_test.cc:1031–1038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1029 }
1030
1031 void TestSliced() {
1032 auto array = ArrayFromJSON(type_, R"(["ab", null, "cd", "ef"])")->Slice(1, 2);
1033 BinaryAppender appender;
1034 ArraySpanVisitor<TypeClass> visitor;
1035 ASSERT_OK(visitor.Visit(*array->data(), &appender));
1036 ASSERT_THAT(appender.data, ::testing::ElementsAreArray({"(null)", "cd"}));
1037 ARROW_UNUSED(visitor); // Workaround weird MSVC warning
1038 }
1039
1040 protected:
1041 std::shared_ptr<DataType> type_;

Callers 1

TYPED_TESTFunction · 0.80

Calls 4

ArrayFromJSONFunction · 0.85
SliceMethod · 0.45
VisitMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected