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

Side by Side Diff: base/android/jni_generator/jni_generator_tests.py

Issue 12594021: Android: fixes jni_generator for @CalledByNative with generics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/android/jni_generator/jni_generator.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Tests for jni_generator.py. 6 """Tests for jni_generator.py.
7 7
8 This test suite contains various tests for the JNI generator. 8 This test suite contains various tests for the JNI generator.
9 It exercises the low-level parser all the way up to the 9 It exercises the low-level parser all the way up to the
10 code generator and ensures the output matches a golden 10 code generator and ensures the output matches a golden
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 716
717 #endif // org_chromium_TestJni_JNI 717 #endif // org_chromium_TestJni_JNI
718 """ 718 """
719 self.assertTextEquals(golden_content, h.GetContent()) 719 self.assertTextEquals(golden_content, h.GetContent())
720 720
721 def testCalledByNatives(self): 721 def testCalledByNatives(self):
722 test_data = """" 722 test_data = """"
723 import android.graphics.Bitmap; 723 import android.graphics.Bitmap;
724 import android.view.View; 724 import android.view.View;
725 import java.io.InputStream; 725 import java.io.InputStream;
726 import java.util.List;
726 727
727 class InnerClass {} 728 class InnerClass {}
728 729
729 @CalledByNative 730 @CalledByNative
730 InnerClass showConfirmInfoBar(int nativeInfoBar, 731 InnerClass showConfirmInfoBar(int nativeInfoBar,
731 String buttonOk, String buttonCancel, String title, Bitmap icon) { 732 String buttonOk, String buttonCancel, String title, Bitmap icon) {
732 InfoBar infobar = new ConfirmInfoBar(nativeInfoBar, mContext, 733 InfoBar infobar = new ConfirmInfoBar(nativeInfoBar, mContext,
733 buttonOk, buttonCancel, 734 buttonOk, buttonCancel,
734 title, icon); 735 title, icon);
735 return infobar; 736 return infobar;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 public double[] returnDoubleArray(); 793 public double[] returnDoubleArray();
793 794
794 @CalledByNative 795 @CalledByNative
795 public Object[] returnObjectArray(); 796 public Object[] returnObjectArray();
796 797
797 @CalledByNative 798 @CalledByNative
798 public byte[][] returnArrayOfByteArray(); 799 public byte[][] returnArrayOfByteArray();
799 800
800 @CalledByNative 801 @CalledByNative
801 public Bitmap.CompressFormat getCompressFormat(); 802 public Bitmap.CompressFormat getCompressFormat();
803
804 @CalledByNative
805 public List<Bitmap.CompressFormat> getCompressFormatList();
802 """ 806 """
803 jni_generator.JniParams.SetFullyQualifiedClass('org/chromium/Foo') 807 jni_generator.JniParams.SetFullyQualifiedClass('org/chromium/Foo')
804 jni_generator.JniParams.ExtractImportsAndInnerClasses(test_data) 808 jni_generator.JniParams.ExtractImportsAndInnerClasses(test_data)
805 called_by_natives = jni_generator.ExtractCalledByNatives(test_data) 809 called_by_natives = jni_generator.ExtractCalledByNatives(test_data)
806 golden_called_by_natives = [ 810 golden_called_by_natives = [
807 CalledByNative( 811 CalledByNative(
808 return_type='InnerClass', 812 return_type='InnerClass',
809 system_class=False, 813 system_class=False,
810 static=False, 814 static=False,
811 name='showConfirmInfoBar', 815 name='showConfirmInfoBar',
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 return_type='Bitmap.CompressFormat', 1003 return_type='Bitmap.CompressFormat',
1000 system_class=False, 1004 system_class=False,
1001 static=False, 1005 static=False,
1002 name='getCompressFormat', 1006 name='getCompressFormat',
1003 method_id_var_name='getCompressFormat', 1007 method_id_var_name='getCompressFormat',
1004 java_class_name='', 1008 java_class_name='',
1005 params=[], 1009 params=[],
1006 env_call=('Void', ''), 1010 env_call=('Void', ''),
1007 unchecked=False, 1011 unchecked=False,
1008 ), 1012 ),
1013 CalledByNative(
1014 return_type='List<Bitmap.CompressFormat>',
1015 system_class=False,
1016 static=False,
1017 name='getCompressFormatList',
1018 method_id_var_name='getCompressFormatList',
1019 java_class_name='',
1020 params=[],
1021 env_call=('Void', ''),
1022 unchecked=False,
1023 ),
1009 ] 1024 ]
1010 self.assertListEquals(golden_called_by_natives, called_by_natives) 1025 self.assertListEquals(golden_called_by_natives, called_by_natives)
1011 h = jni_generator.InlHeaderFileGenerator('', 'org/chromium/TestJni', 1026 h = jni_generator.InlHeaderFileGenerator('', 'org/chromium/TestJni',
1012 [], called_by_natives) 1027 [], called_by_natives)
1013 golden_content = """\ 1028 golden_content = """\
1014 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1029 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
1015 // Use of this source code is governed by a BSD-style license that can be 1030 // Use of this source code is governed by a BSD-style license that can be
1016 // found in the LICENSE file. 1031 // found in the LICENSE file.
1017 1032
1018 // This file is autogenerated by 1033 // This file is autogenerated by
(...skipping 28 matching lines...) Expand all
1047 static base::subtle::AtomicWord g_TestJni_showConfirmInfoBar = 0; 1062 static base::subtle::AtomicWord g_TestJni_showConfirmInfoBar = 0;
1048 static ScopedJavaLocalRef<jobject> Java_TestJni_showConfirmInfoBar(JNIEnv* env, 1063 static ScopedJavaLocalRef<jobject> Java_TestJni_showConfirmInfoBar(JNIEnv* env,
1049 jobject obj, jint nativeInfoBar, 1064 jobject obj, jint nativeInfoBar,
1050 jstring buttonOk, 1065 jstring buttonOk,
1051 jstring buttonCancel, 1066 jstring buttonCancel,
1052 jstring title, 1067 jstring title,
1053 jobject icon) { 1068 jobject icon) {
1054 /* Must call RegisterNativesImpl() */ 1069 /* Must call RegisterNativesImpl() */
1055 DCHECK(g_TestJni_clazz); 1070 DCHECK(g_TestJni_clazz);
1056 jmethodID method_id = 1071 jmethodID method_id =
1057 base::android::MethodID::LazyGet< 1072 base::android::MethodID::LazyGet<
1058 base::android::MethodID::TYPE_INSTANCE>( 1073 base::android::MethodID::TYPE_INSTANCE>(
1059 env, g_TestJni_clazz, 1074 env, g_TestJni_clazz,
1060 "showConfirmInfoBar", 1075 "showConfirmInfoBar",
1061 1076
1062 "(" 1077 "("
1063 "I" 1078 "I"
1064 "Ljava/lang/String;" 1079 "Ljava/lang/String;"
1065 "Ljava/lang/String;" 1080 "Ljava/lang/String;"
1066 "Ljava/lang/String;" 1081 "Ljava/lang/String;"
1067 "Landroid/graphics/Bitmap;" 1082 "Landroid/graphics/Bitmap;"
(...skipping 10 matching lines...) Expand all
1078 1093
1079 static base::subtle::AtomicWord g_TestJni_showAutoLoginInfoBar = 0; 1094 static base::subtle::AtomicWord g_TestJni_showAutoLoginInfoBar = 0;
1080 static ScopedJavaLocalRef<jobject> Java_TestJni_showAutoLoginInfoBar(JNIEnv* 1095 static ScopedJavaLocalRef<jobject> Java_TestJni_showAutoLoginInfoBar(JNIEnv*
1081 env, jobject obj, jint nativeInfoBar, 1096 env, jobject obj, jint nativeInfoBar,
1082 jstring realm, 1097 jstring realm,
1083 jstring account, 1098 jstring account,
1084 jstring args) { 1099 jstring args) {
1085 /* Must call RegisterNativesImpl() */ 1100 /* Must call RegisterNativesImpl() */
1086 DCHECK(g_TestJni_clazz); 1101 DCHECK(g_TestJni_clazz);
1087 jmethodID method_id = 1102 jmethodID method_id =
1088 base::android::MethodID::LazyGet< 1103 base::android::MethodID::LazyGet<
1089 base::android::MethodID::TYPE_INSTANCE>( 1104 base::android::MethodID::TYPE_INSTANCE>(
1090 env, g_TestJni_clazz, 1105 env, g_TestJni_clazz,
1091 "showAutoLoginInfoBar", 1106 "showAutoLoginInfoBar",
1092 1107
1093 "(" 1108 "("
1094 "I" 1109 "I"
1095 "Ljava/lang/String;" 1110 "Ljava/lang/String;"
1096 "Ljava/lang/String;" 1111 "Ljava/lang/String;"
1097 "Ljava/lang/String;" 1112 "Ljava/lang/String;"
1098 ")" 1113 ")"
1099 "Lorg/chromium/Foo$InnerClass;", 1114 "Lorg/chromium/Foo$InnerClass;",
1100 &g_TestJni_showAutoLoginInfoBar); 1115 &g_TestJni_showAutoLoginInfoBar);
1101 1116
1102 jobject ret = 1117 jobject ret =
1103 env->CallObjectMethod(obj, 1118 env->CallObjectMethod(obj,
1104 method_id, nativeInfoBar, realm, account, args); 1119 method_id, nativeInfoBar, realm, account, args);
1105 base::android::CheckException(env); 1120 base::android::CheckException(env);
1106 return ScopedJavaLocalRef<jobject>(env, ret); 1121 return ScopedJavaLocalRef<jobject>(env, ret);
1107 } 1122 }
1108 1123
1109 static base::subtle::AtomicWord g_InfoBar_dismiss = 0; 1124 static base::subtle::AtomicWord g_InfoBar_dismiss = 0;
1110 static void Java_InfoBar_dismiss(JNIEnv* env, jobject obj) { 1125 static void Java_InfoBar_dismiss(JNIEnv* env, jobject obj) {
1111 /* Must call RegisterNativesImpl() */ 1126 /* Must call RegisterNativesImpl() */
1112 DCHECK(g_InfoBar_clazz); 1127 DCHECK(g_InfoBar_clazz);
1113 jmethodID method_id = 1128 jmethodID method_id =
1114 base::android::MethodID::LazyGet< 1129 base::android::MethodID::LazyGet<
1115 base::android::MethodID::TYPE_INSTANCE>( 1130 base::android::MethodID::TYPE_INSTANCE>(
1116 env, g_InfoBar_clazz, 1131 env, g_InfoBar_clazz,
1117 "dismiss", 1132 "dismiss",
1118 1133
1119 "(" 1134 "("
1120 ")" 1135 ")"
1121 "V", 1136 "V",
1122 &g_InfoBar_dismiss); 1137 &g_InfoBar_dismiss);
1123 1138
1124 env->CallVoidMethod(obj, 1139 env->CallVoidMethod(obj,
1125 method_id); 1140 method_id);
1126 base::android::CheckException(env); 1141 base::android::CheckException(env);
1127 1142
1128 } 1143 }
1129 1144
1130 static base::subtle::AtomicWord g_TestJni_shouldShowAutoLogin = 0; 1145 static base::subtle::AtomicWord g_TestJni_shouldShowAutoLogin = 0;
1131 static jboolean Java_TestJni_shouldShowAutoLogin(JNIEnv* env, jobject view, 1146 static jboolean Java_TestJni_shouldShowAutoLogin(JNIEnv* env, jobject view,
1132 jstring realm, 1147 jstring realm,
1133 jstring account, 1148 jstring account,
1134 jstring args) { 1149 jstring args) {
1135 /* Must call RegisterNativesImpl() */ 1150 /* Must call RegisterNativesImpl() */
1136 DCHECK(g_TestJni_clazz); 1151 DCHECK(g_TestJni_clazz);
1137 jmethodID method_id = 1152 jmethodID method_id =
1138 base::android::MethodID::LazyGet< 1153 base::android::MethodID::LazyGet<
1139 base::android::MethodID::TYPE_STATIC>( 1154 base::android::MethodID::TYPE_STATIC>(
1140 env, g_TestJni_clazz, 1155 env, g_TestJni_clazz,
1141 "shouldShowAutoLogin", 1156 "shouldShowAutoLogin",
1142 1157
1143 "(" 1158 "("
1144 "Landroid/view/View;" 1159 "Landroid/view/View;"
1145 "Ljava/lang/String;" 1160 "Ljava/lang/String;"
1146 "Ljava/lang/String;" 1161 "Ljava/lang/String;"
1147 "Ljava/lang/String;" 1162 "Ljava/lang/String;"
1148 ")" 1163 ")"
1149 "Z", 1164 "Z",
1150 &g_TestJni_shouldShowAutoLogin); 1165 &g_TestJni_shouldShowAutoLogin);
1151 1166
1152 jboolean ret = 1167 jboolean ret =
1153 env->CallStaticBooleanMethod(g_TestJni_clazz, 1168 env->CallStaticBooleanMethod(g_TestJni_clazz,
1154 method_id, view, realm, account, args); 1169 method_id, view, realm, account, args);
1155 base::android::CheckException(env); 1170 base::android::CheckException(env);
1156 return ret; 1171 return ret;
1157 } 1172 }
1158 1173
1159 static base::subtle::AtomicWord g_TestJni_openUrl = 0; 1174 static base::subtle::AtomicWord g_TestJni_openUrl = 0;
1160 static ScopedJavaLocalRef<jobject> Java_TestJni_openUrl(JNIEnv* env, jstring 1175 static ScopedJavaLocalRef<jobject> Java_TestJni_openUrl(JNIEnv* env, jstring
1161 url) { 1176 url) {
1162 /* Must call RegisterNativesImpl() */ 1177 /* Must call RegisterNativesImpl() */
1163 DCHECK(g_TestJni_clazz); 1178 DCHECK(g_TestJni_clazz);
1164 jmethodID method_id = 1179 jmethodID method_id =
1165 base::android::MethodID::LazyGet< 1180 base::android::MethodID::LazyGet<
1166 base::android::MethodID::TYPE_STATIC>( 1181 base::android::MethodID::TYPE_STATIC>(
1167 env, g_TestJni_clazz, 1182 env, g_TestJni_clazz,
1168 "openUrl", 1183 "openUrl",
1169 1184
1170 "(" 1185 "("
1171 "Ljava/lang/String;" 1186 "Ljava/lang/String;"
1172 ")" 1187 ")"
1173 "Ljava/io/InputStream;", 1188 "Ljava/io/InputStream;",
1174 &g_TestJni_openUrl); 1189 &g_TestJni_openUrl);
1175 1190
1176 jobject ret = 1191 jobject ret =
1177 env->CallStaticObjectMethod(g_TestJni_clazz, 1192 env->CallStaticObjectMethod(g_TestJni_clazz,
1178 method_id, url); 1193 method_id, url);
1179 base::android::CheckException(env); 1194 base::android::CheckException(env);
1180 return ScopedJavaLocalRef<jobject>(env, ret); 1195 return ScopedJavaLocalRef<jobject>(env, ret);
1181 } 1196 }
1182 1197
1183 static base::subtle::AtomicWord g_TestJni_activateHardwareAcceleration = 0; 1198 static base::subtle::AtomicWord g_TestJni_activateHardwareAcceleration = 0;
1184 static void Java_TestJni_activateHardwareAcceleration(JNIEnv* env, jobject obj, 1199 static void Java_TestJni_activateHardwareAcceleration(JNIEnv* env, jobject obj,
1185 jboolean activated, 1200 jboolean activated,
1186 jint iPid, 1201 jint iPid,
1187 jint iType, 1202 jint iType,
1188 jint iPrimaryID, 1203 jint iPrimaryID,
1189 jint iSecondaryID) { 1204 jint iSecondaryID) {
1190 /* Must call RegisterNativesImpl() */ 1205 /* Must call RegisterNativesImpl() */
1191 DCHECK(g_TestJni_clazz); 1206 DCHECK(g_TestJni_clazz);
1192 jmethodID method_id = 1207 jmethodID method_id =
1193 base::android::MethodID::LazyGet< 1208 base::android::MethodID::LazyGet<
1194 base::android::MethodID::TYPE_INSTANCE>( 1209 base::android::MethodID::TYPE_INSTANCE>(
1195 env, g_TestJni_clazz, 1210 env, g_TestJni_clazz,
1196 "activateHardwareAcceleration", 1211 "activateHardwareAcceleration",
1197 1212
1198 "(" 1213 "("
1199 "Z" 1214 "Z"
1200 "I" 1215 "I"
1201 "I" 1216 "I"
1202 "I" 1217 "I"
1203 "I" 1218 "I"
1204 ")" 1219 ")"
1205 "V", 1220 "V",
1206 &g_TestJni_activateHardwareAcceleration); 1221 &g_TestJni_activateHardwareAcceleration);
1207 1222
1208 env->CallVoidMethod(obj, 1223 env->CallVoidMethod(obj,
1209 method_id, activated, iPid, iType, iPrimaryID, iSecondaryID); 1224 method_id, activated, iPid, iType, iPrimaryID, iSecondaryID);
1210 base::android::CheckException(env); 1225 base::android::CheckException(env);
1211 1226
1212 } 1227 }
1213 1228
1214 static base::subtle::AtomicWord g_TestJni_uncheckedCall = 0; 1229 static base::subtle::AtomicWord g_TestJni_uncheckedCall = 0;
1215 static void Java_TestJni_uncheckedCall(JNIEnv* env, jobject obj, jint iParam) { 1230 static void Java_TestJni_uncheckedCall(JNIEnv* env, jobject obj, jint iParam) {
1216 /* Must call RegisterNativesImpl() */ 1231 /* Must call RegisterNativesImpl() */
1217 DCHECK(g_TestJni_clazz); 1232 DCHECK(g_TestJni_clazz);
1218 jmethodID method_id = 1233 jmethodID method_id =
1219 base::android::MethodID::LazyGet< 1234 base::android::MethodID::LazyGet<
1220 base::android::MethodID::TYPE_INSTANCE>( 1235 base::android::MethodID::TYPE_INSTANCE>(
1221 env, g_TestJni_clazz, 1236 env, g_TestJni_clazz,
1222 "uncheckedCall", 1237 "uncheckedCall",
1223 1238
1224 "(" 1239 "("
1225 "I" 1240 "I"
1226 ")" 1241 ")"
1227 "V", 1242 "V",
1228 &g_TestJni_uncheckedCall); 1243 &g_TestJni_uncheckedCall);
1229 1244
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 1426
1412 jobjectArray ret = 1427 jobjectArray ret =
1413 static_cast<jobjectArray>(env->CallObjectMethod(obj, 1428 static_cast<jobjectArray>(env->CallObjectMethod(obj,
1414 method_id)); 1429 method_id));
1415 base::android::CheckException(env); 1430 base::android::CheckException(env);
1416 return ScopedJavaLocalRef<jobjectArray>(env, ret); 1431 return ScopedJavaLocalRef<jobjectArray>(env, ret);
1417 } 1432 }
1418 1433
1419 static base::subtle::AtomicWord g_TestJni_returnArrayOfByteArray = 0; 1434 static base::subtle::AtomicWord g_TestJni_returnArrayOfByteArray = 0;
1420 static ScopedJavaLocalRef<jobjectArray> 1435 static ScopedJavaLocalRef<jobjectArray>
1421 Java_TestJni_returnArrayOfByteArray(JNIEnv* env, jobject obj) { 1436 Java_TestJni_returnArrayOfByteArray(JNIEnv* env, jobject obj) {
1422 /* Must call RegisterNativesImpl() */ 1437 /* Must call RegisterNativesImpl() */
1423 DCHECK(g_TestJni_clazz); 1438 DCHECK(g_TestJni_clazz);
1424 jmethodID method_id = 1439 jmethodID method_id =
1425 base::android::MethodID::LazyGet< 1440 base::android::MethodID::LazyGet<
1426 base::android::MethodID::TYPE_INSTANCE>( 1441 base::android::MethodID::TYPE_INSTANCE>(
1427 env, g_TestJni_clazz, 1442 env, g_TestJni_clazz,
1428 "returnArrayOfByteArray", 1443 "returnArrayOfByteArray",
1429 1444
1430 "(" 1445 "("
1431 ")" 1446 ")"
(...skipping 23 matching lines...) Expand all
1455 "Landroid/graphics/Bitmap$CompressFormat;", 1470 "Landroid/graphics/Bitmap$CompressFormat;",
1456 &g_TestJni_getCompressFormat); 1471 &g_TestJni_getCompressFormat);
1457 1472
1458 jobject ret = 1473 jobject ret =
1459 env->CallObjectMethod(obj, 1474 env->CallObjectMethod(obj,
1460 method_id); 1475 method_id);
1461 base::android::CheckException(env); 1476 base::android::CheckException(env);
1462 return ScopedJavaLocalRef<jobject>(env, ret); 1477 return ScopedJavaLocalRef<jobject>(env, ret);
1463 } 1478 }
1464 1479
1480 static base::subtle::AtomicWord g_TestJni_getCompressFormatList = 0;
1481 static ScopedJavaLocalRef<jobject> Java_TestJni_getCompressFormatList(JNIEnv*
1482 env, jobject obj) {
1483 /* Must call RegisterNativesImpl() */
1484 DCHECK(g_TestJni_clazz);
1485 jmethodID method_id =
1486 base::android::MethodID::LazyGet<
1487 base::android::MethodID::TYPE_INSTANCE>(
1488 env, g_TestJni_clazz,
1489 "getCompressFormatList",
1490
1491 "("
1492 ")"
1493 "Ljava/util/List;",
1494 &g_TestJni_getCompressFormatList);
1495
1496 jobject ret =
1497 env->CallObjectMethod(obj,
1498 method_id);
1499 base::android::CheckException(env);
1500 return ScopedJavaLocalRef<jobject>(env, ret);
1501 }
1502
1465 // Step 3: RegisterNatives. 1503 // Step 3: RegisterNatives.
1466 1504
1467 static bool RegisterNativesImpl(JNIEnv* env) { 1505 static bool RegisterNativesImpl(JNIEnv* env) {
1468 1506
1469 g_TestJni_clazz = reinterpret_cast<jclass>(env->NewGlobalRef( 1507 g_TestJni_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
1470 base::android::GetUnscopedClass(env, kTestJniClassPath))); 1508 base::android::GetUnscopedClass(env, kTestJniClassPath)));
1471 g_InfoBar_clazz = reinterpret_cast<jclass>(env->NewGlobalRef( 1509 g_InfoBar_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
1472 base::android::GetUnscopedClass(env, kInfoBarClassPath))); 1510 base::android::GetUnscopedClass(env, kInfoBarClassPath)));
1473 return true; 1511 return true;
1474 } 1512 }
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1958 1996
1959 def testJniParamsJavaToJni(self): 1997 def testJniParamsJavaToJni(self):
1960 self.assertTextEquals('I', JniParams.JavaToJni('int')) 1998 self.assertTextEquals('I', JniParams.JavaToJni('int'))
1961 self.assertTextEquals('[B', JniParams.JavaToJni('byte[]')) 1999 self.assertTextEquals('[B', JniParams.JavaToJni('byte[]'))
1962 self.assertTextEquals( 2000 self.assertTextEquals(
1963 '[Ljava/nio/ByteBuffer;', JniParams.JavaToJni('java/nio/ByteBuffer[]')) 2001 '[Ljava/nio/ByteBuffer;', JniParams.JavaToJni('java/nio/ByteBuffer[]'))
1964 2002
1965 2003
1966 if __name__ == '__main__': 2004 if __name__ == '__main__':
1967 unittest.main() 2005 unittest.main()
OLDNEW
« 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