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

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

Issue 214543002: Android: improves error message for Outer.Inner usage in JNI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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_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 32fb4c6bb81b65d2f4325ae017de770eb8d5f587..61d76c8d016e1b356b6d659fda06fbba573ba580 100755
--- a/base/android/jni_generator/jni_generator_tests.py
+++ b/base/android/jni_generator/jni_generator_tests.py
@@ -994,5 +994,22 @@ class Foo {
test_data, 'org/chromium/example/jni_generator/Test', options)
self.assertGoldenTextEquals(jni_from_java.GetContent())
+ def testOuterInnerRaises(self):
+ test_data = """
+ package org.chromium.media;
+
+ @CalledByNative
+ static int getCaptureFormatWidth(VideoCapture.CaptureFormat format) {
+ return format.getWidth();
+ }
+ """
+ def willRaise():
+ jni_generator.JNIFromJavaSource(
+ test_data,
+ 'org/chromium/media/VideoCaptureFactory',
+ TestOptions())
+ self.assertRaises(SyntaxError, willRaise)
+
+
if __name__ == '__main__':
unittest.main()
« 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