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

Unified Diff: base/android/jni_array_unittest.cc

Issue 874543003: Add support for TraceEvent before the native library is loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments, cleanup and a JNI unittest. Created 5 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/android/jni_array.cc ('k') | base/base.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_array_unittest.cc
diff --git a/base/android/jni_array_unittest.cc b/base/android/jni_array_unittest.cc
index 7cb896ce9034fd159e044fdcb8a6f7ee7c2159df..80ec1eac0d2c366664f45147922b5dbac3ff7671 100644
--- a/base/android/jni_array_unittest.cc
+++ b/base/android/jni_array_unittest.cc
@@ -84,6 +84,13 @@ TEST(JniArray, LongConversions) {
const std::vector<int64> vec(kLongs, kLongs + kLen);
CheckLongConversion(env, kLongs, kLen, ToJavaLongArray(env, vec));
+
+ std::vector<int64_t> longs;
+ ScopedJavaLocalRef<jlongArray> jlongs = ToJavaLongArray(env, vec);
+ AppendJavaLongArrayToLongVector(env, jlongs.obj(), &longs);
+ for (size_t i = 0; i < kLen; ++i) {
+ ASSERT_EQ(vec[i], longs[i]);
+ }
}
TEST(JniArray, JavaIntArrayToIntVector) {
« no previous file with comments | « base/android/jni_array.cc ('k') | base/base.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698