Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: base/android/jni_array_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/android/jni_android_unittest.cc ('k') | base/android/jni_string_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/android/jni_array.h" 5 #include "base/android/jni_array.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/googletest/include/gtest/gtest.h"
10 10
11 namespace base { 11 namespace base {
12 namespace android { 12 namespace android {
13 13
14 TEST(JniArray, BasicConversions) { 14 TEST(JniArray, BasicConversions) {
15 const uint8_t kBytes[] = {0, 1, 2, 3}; 15 const uint8_t kBytes[] = {0, 1, 2, 3};
16 const size_t kLen = arraysize(kBytes); 16 const size_t kLen = arraysize(kBytes);
17 JNIEnv* env = AttachCurrentThread(); 17 JNIEnv* env = AttachCurrentThread();
18 ScopedJavaLocalRef<jbyteArray> bytes = ToJavaByteArray(env, kBytes, kLen); 18 ScopedJavaLocalRef<jbyteArray> bytes = ToJavaByteArray(env, kBytes, kLen);
19 ASSERT_TRUE(bytes.obj()); 19 ASSERT_TRUE(bytes.obj());
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 EXPECT_EQ(kNumItems, out.size()); 285 EXPECT_EQ(kNumItems, out.size());
286 CheckIntArrayConversion(env, int_array0, out[0], kLen0); 286 CheckIntArrayConversion(env, int_array0, out[0], kLen0);
287 CheckIntArrayConversion(env, int_array1, out[1], kLen1); 287 CheckIntArrayConversion(env, int_array1, out[1], kLen1);
288 CheckIntArrayConversion(env, int_array2, out[2], kLen2); 288 CheckIntArrayConversion(env, int_array2, out[2], kLen2);
289 CheckIntArrayConversion(env, int_array3, out[3], kLen3); 289 CheckIntArrayConversion(env, int_array3, out[3], kLen3);
290 } 290 }
291 291
292 } // namespace android 292 } // namespace android
293 } // namespace base 293 } // namespace base
OLDNEW
« no previous file with comments | « base/android/jni_android_unittest.cc ('k') | base/android/jni_string_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698