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

Unified Diff: base/android/jni_generator/sample_for_tests.cc

Issue 1557623002: Port //base/android/jni_generator/jni_generator.gyp to GN (Closed) 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/android/jni_generator/jni_generator.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_generator/sample_for_tests.cc
diff --git a/base/android/jni_generator/sample_for_tests.cc b/base/android/jni_generator/sample_for_tests.cc
index 3fca39a55f522164f21ade6cf91cf7a26adb6614..08e5ac9666474c442013d4ea0ae876f150929709 100644
--- a/base/android/jni_generator/sample_for_tests.cc
+++ b/base/android/jni_generator/sample_for_tests.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <iostream>
+
#include "base/android/jni_generator/sample_for_tests.h"
#include "base/android/jni_android.h"
@@ -62,6 +64,7 @@ void CPPClass::IterateAndDoSomethingWithStructB(
it != map_.end(); ++it) {
long key = it->first;
std::string value = it->second;
+ std::cout << key << value;
}
map_.clear();
}
@@ -97,10 +100,6 @@ static ScopedJavaLocalRef<jobject> GetNonPODDatatype(
return ScopedJavaLocalRef<jobject>();
}
-static jint InnerFunction(JNIEnv*, jclass) {
- return 0;
-}
-
} // namespace android
} // namespace base
@@ -118,6 +117,8 @@ int main() {
int bar = base::android::Java_SampleForTests_javaMethod(
env, my_java_object, 1, 2);
+ std::cout << foo << bar;
+
for (int i = 0; i < 10; ++i) {
// Creates a "struct" that will then be used by the java side.
ScopedJavaLocalRef<jobject> struct_a =
@@ -127,5 +128,9 @@ int main() {
env, my_java_object, struct_a.obj());
}
base::android::Java_SampleForTests_iterateAndDoSomething(env, my_java_object);
+ base::android::Java_SampleForTests_packagePrivateJavaMethod(env,
+ my_java_object);
+ base::android::Java_SampleForTests_methodThatThrowsException(env,
+ my_java_object);
return 0;
}
« no previous file with comments | « base/android/jni_generator/jni_generator.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698