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

Method TestSliced

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

Source from the content-addressed store, hash-verified

1006 }
1007
1008 void TestSliced() {
1009 auto array = ArrayFromJSON(type_, R"(["ab", null, "cd", "ef"])")->Slice(1, 2);
1010 BinaryAppender appender;
1011 ArraySpanVisitor<TypeClass> visitor;
1012 ASSERT_OK(visitor.Visit(*array->data(), &appender));
1013 ASSERT_THAT(appender.data, ::testing::ElementsAreArray({"(null)", "cd"}));
1014 ARROW_UNUSED(visitor); // Workaround weird MSVC warning
1015 }
1016
1017 protected:
1018 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