@@ -113,6 +113,63 @@ def test_jni():
113
113
"{" + os .linesep )
114
114
test .add_latest_input_as_output (True )
115
115
116
+ # Check signature that breaks verbose regexes
117
+ test .add_input ("./NetworkTablesJNI.cpp" ,
118
+ "/*" + os .linesep + \
119
+ " * Class: edu_wpi_first_networktables_NetworkTablesJNI" + os .linesep + \
120
+ " * Method: getEntry" + os .linesep + \
121
+ " * Signature: (ILjava/lang/String;)I" + os .linesep + \
122
+ " */" + os .linesep + \
123
+ "JNIEXPORT jint JNICALL" + os .linesep + \
124
+ "Java_edu_wpi_first_networktables_NetworkTablesJNI_getEntry(JNIEnv* env, jclass," + os .linesep + \
125
+ " jint inst," + os .linesep + \
126
+ " jstring key) {" + os .linesep )
127
+ test .add_output ("/*" + os .linesep + \
128
+ " * Class: edu_wpi_first_networktables_NetworkTablesJNI" + os .linesep + \
129
+ " * Method: getEntry" + os .linesep + \
130
+ " * Signature: (ILjava/lang/String;)I" + os .linesep + \
131
+ " */" + os .linesep + \
132
+ "JNIEXPORT jint JNICALL" + os .linesep + \
133
+ "Java_edu_wpi_first_networktables_NetworkTablesJNI_getEntry" + os .linesep + \
134
+ " (JNIEnv* env, jclass, jint inst, jstring key)" + os .linesep + \
135
+ "{" + os .linesep , True , True )
136
+
137
+ # Function with array type as argument
138
+ test .add_input ("./NetworkTablesJNI.cpp" ,
139
+ "/*" + os .linesep + \
140
+ " * Class: edu_wpi_first_networktables_NetworkTablesJNI" + os .linesep + \
141
+ " * Method: getEntries" + os .linesep + \
142
+ " * Signature: (ILjava/lang/String;I)[I" + os .linesep + \
143
+ " */" + os .linesep + \
144
+ "JNIEXPORT jintArray JNICALL" + os .linesep + \
145
+ "Java_edu_wpi_first_networktables_NetworkTablesJNI_getEntries(JNIEnv* env," + os .linesep + \
146
+ " jclass, jint inst," + os .linesep + \
147
+ " jstring prefix," + os .linesep + \
148
+ " jint types) {" + os .linesep )
149
+ test .add_output ("/*" + os .linesep + \
150
+ " * Class: edu_wpi_first_networktables_NetworkTablesJNI" + os .linesep + \
151
+ " * Method: getEntries" + os .linesep + \
152
+ " * Signature: (ILjava/lang/String;I)[I" + os .linesep + \
153
+ " */" + os .linesep + \
154
+ "JNIEXPORT jintArray JNICALL" + os .linesep + \
155
+ "Java_edu_wpi_first_networktables_NetworkTablesJNI_getEntries" + os .linesep + \
156
+ " (JNIEnv* env, jclass, jint inst, jstring prefix, jint types)" + os .linesep + \
157
+ "{" + os .linesep , True , True )
158
+
159
+ # Ensure functions with overloads are handled correctly
160
+ test .add_input ("./NetworkTablesJNI.cpp" ,
161
+ "/*" + os .linesep + \
162
+ " * Class: edu_wpi_first_networktables_NetworkTablesJNI" + os .linesep + \
163
+ " * Method: setRaw" + os .linesep + \
164
+ " * Signature: (IJ[BZ)Z" + os .linesep + \
165
+ " */" + os .linesep + \
166
+ "JNIEXPORT jboolean JNICALL" + os .linesep + \
167
+ "Java_edu_wpi_first_networktables_NetworkTablesJNI_setRaw__IJ_3BZ" + os .linesep + \
168
+ " (JNIEnv* env, jclass, jint entry, jlong time, jbyteArray value," + os .linesep + \
169
+ " jboolean force)" + os .linesep + \
170
+ "{" + os .linesep )
171
+ test .add_latest_input_as_output (True )
172
+
116
173
# Ensure text before JNIEXPORT and after args and ")" is handled correctly
117
174
# as well as two JNI functions in a row
118
175
test .add_input ("./TestJNI.cpp" ,
0 commit comments