cpp/src/arrow/stl_iterator_test.cc
// Test compatibility with various STL algorithms
Test compatibility with various STL algorithms
Test compatibility with various STL algorithms
TEST(ArrayIterator, StdFind) {
  auto array = checked_pointer_cast<StringArray>(
      ArrayFromJSON(utf8(), R"(["foo", "bar", null, "quux"])"));
  auto it = std::find(array->begin(), array->end(), "bar");
  ASSERT_EQ(it.index(), 1);
  it = std::find(array->begin(), array->end(), nullopt);
  ASSERT_EQ(it.index(), 2);
  it = std::find(array->begin(), array->end(), "zzz");
  ASSERT_EQ(it, array->end());
}
TEST ( ArrayIterator , StdFind ) { auto array = checked_pointer_cast < StringArray > ( ArrayFromJSON ( utf8 ( ) , R" ( ["foo", "bar", null, "quux"] ) " ) ) ; auto it = std :: find ( array -> begin ( ) , array -> end ( ) , " " ) ; ASSERT_EQ ( it . index ( ) , 1 ) ; it = std :: find ( array -> begin ( ) , array -> end ( ) , nullopt ) ; ASSERT_EQ ( it . index ( ) , 2 ) ; it = std :: find ( array -> begin ( ) , array -> end ( ) , " " ) ; ASSERT_EQ ( it , array -> end ( ) ) ; }
Test compatibility with various STL algorithms
Test compatibility with various STL algorithms