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

Unified Diff: base/android/jni_generator/jni_generator_tests.py

Issue 872843004: Update JNI generator for javap version 1.8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shorten line in test case Created 5 years, 10 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_generator/jni_generator.py ('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/jni_generator_tests.py
diff --git a/base/android/jni_generator/jni_generator_tests.py b/base/android/jni_generator/jni_generator_tests.py
index a7ce537a6ccba2654fdb762167364ba3261949d3..7e39cda3d369f2f8b02a86e08e4747ea7662ac70 100755
--- a/base/android/jni_generator/jni_generator_tests.py
+++ b/base/android/jni_generator/jni_generator_tests.py
@@ -722,7 +722,7 @@ public abstract class java.util.HashSet<T> extends java.util.AbstractSet<E>
self.assertEquals(1, len(jni_from_javap.called_by_natives))
self.assertGoldenTextEquals(jni_from_javap.GetContent())
- def testSnippnetJavap6_7(self):
+ def testSnippnetJavap6_7_8(self):
content_javap6 = """
public class java.util.HashSet {
public boolean add(java.lang.Object);
@@ -736,16 +736,30 @@ public boolean add(E);
Signature: (Ljava/lang/Object;)Z
}
"""
+
+ content_javap8 = """
+public class java.util.HashSet {
+ public boolean add(E);
+ descriptor: (Ljava/lang/Object;)Z
+}
+"""
+
jni_from_javap6 = jni_generator.JNIFromJavaP(content_javap6.split('\n'),
TestOptions())
jni_from_javap7 = jni_generator.JNIFromJavaP(content_javap7.split('\n'),
TestOptions())
+ jni_from_javap8 = jni_generator.JNIFromJavaP(content_javap8.split('\n'),
+ TestOptions())
self.assertTrue(jni_from_javap6.GetContent())
self.assertTrue(jni_from_javap7.GetContent())
+ self.assertTrue(jni_from_javap8.GetContent())
# Ensure the javap7 is correctly parsed and uses the Signature field rather
# than the "E" parameter.
self.assertTextEquals(jni_from_javap6.GetContent(),
jni_from_javap7.GetContent())
+ # Ensure the javap8 is correctly parsed and uses the descriptor field.
+ self.assertTextEquals(jni_from_javap7.GetContent(),
+ jni_from_javap8.GetContent())
def testFromJavaP(self):
contents = self._ReadGoldenFile(os.path.join(os.path.dirname(sys.argv[0]),
« no previous file with comments | « base/android/jni_generator/jni_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698