src/base/android/scoped_java_ref_unittest.cc
TEST_F(JavaObjectArrayReaderTest, RangeBasedFor) {
  JNIEnv* env = AttachCurrentThread();

  int i = 0;
  for (ScopedJavaLocalRef<jobject> element : array_.ReadElements<jobject>()) {
    EXPECT_SAME_OBJECT(element, array_members_[i++]);
  }
  EXPECT_EQ(i, array_len_);
}
// Check that range-based for and the convenience function work as expected.
Check that range-based for and the convenience function work as expected.
Check that range - based for and the convenience function work as expected .
TEST_F(JavaObjectArrayReaderTest, RangeBasedFor) {
  JNIEnv* env = AttachCurrentThread();
  int i = 0;
  for (ScopedJavaLocalRef<jobject> element : array_.ReadElements<jobject>()) {
    EXPECT_SAME_OBJECT(element, array_members_[i++]);
  }
  EXPECT_EQ(i, array_len_);
}
TEST_F ( JavaObjectArrayReaderTest , RangeBasedFor ) { JNIEnv * env = AttachCurrentThread ( ) ; int i = 0 ; for ( ScopedJavaLocalRef < jobject > element : array_ . ReadElements < jobject > ( ) ) { EXPECT_SAME_OBJECT ( element , array_members_ [ i ++ ] ) ; } EXPECT_EQ ( i , array_len_ ) ; }
Check that range-based for and the convenience function work as expected.
Check that range - based for and the convenience function work as expected .