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

Function TEST

cpp/src/arrow/stl_iterator_test.cc:38–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace stl {
37
38TEST(ArrayIterator, Basics) {
39 auto array =
40 checked_pointer_cast<Int32Array>(ArrayFromJSON(int32(), "[4, 5, null, 6]"));
41
42 ArrayIterator<Int32Array> it(*array);
43 optional<int32_t> v = *it;
44 ASSERT_EQ(v, 4);
45 ASSERT_EQ(it[0], 4);
46 ++it;
47 ASSERT_EQ(it[0], 5);
48 ASSERT_EQ(*it, 5);
49 ASSERT_EQ(it[1], nullopt);
50 ASSERT_EQ(it[2], 6);
51}
52
53TEST(ArrayIterator, Arithmetic) {
54 auto array = checked_pointer_cast<Int32Array>(

Callers

nothing calls this directly

Calls 7

ArrayFromJSONFunction · 0.85
fixed_size_binaryFunction · 0.85
ChunkedArrayFromJSONFunction · 0.85
push_backMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected