@@ -58,7 +58,7 @@ struct JNIAsyncTests {
5858 expectedChunks: [
5959 """
6060 @_cdecl( " Java_com_example_swift_SwiftModule__00024asyncVoid__Ljava_util_concurrent_CompletableFuture_2 " )
61- func Java_com_example_swift_SwiftModule__00024asyncVoid__Ljava_util_concurrent_CompletableFuture_2(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, result_future: jobject?) {
61+ public func Java_com_example_swift_SwiftModule__00024asyncVoid__Ljava_util_concurrent_CompletableFuture_2(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, result_future: jobject?) {
6262 let globalFuture = environment.interface.NewGlobalRef(environment, result_future)
6363 var task: Task<Void, Never>? = nil
6464 #if swift(>=6.2)
@@ -132,7 +132,7 @@ struct JNIAsyncTests {
132132 expectedChunks: [
133133 """
134134 @_cdecl( " Java_com_example_swift_SwiftModule__00024async__Ljava_util_concurrent_CompletableFuture_2 " )
135- func Java_com_example_swift_SwiftModule__00024async__Ljava_util_concurrent_CompletableFuture_2(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, result_future: jobject?) {
135+ public func Java_com_example_swift_SwiftModule__00024async__Ljava_util_concurrent_CompletableFuture_2(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, result_future: jobject?) {
136136 let globalFuture = environment.interface.NewGlobalRef(environment, result_future)
137137 var task: Task<Void, Never>? = nil
138138 #if swift(>=6.2)
@@ -220,7 +220,7 @@ struct JNIAsyncTests {
220220 expectedChunks: [
221221 """
222222 @_cdecl( " Java_com_example_swift_SwiftModule__00024async__JLjava_util_concurrent_CompletableFuture_2 " )
223- func Java_com_example_swift_SwiftModule__00024async__JLjava_util_concurrent_CompletableFuture_2(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, i: jlong, result_future: jobject?) {
223+ public func Java_com_example_swift_SwiftModule__00024async__JLjava_util_concurrent_CompletableFuture_2(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, i: jlong, result_future: jobject?) {
224224 let globalFuture = environment.interface.NewGlobalRef(environment, result_future)
225225 var task: Task<Void, Never>? = nil
226226 #if swift(>=6.2)
@@ -251,7 +251,7 @@ struct JNIAsyncTests {
251251 _ = environment.interface.CallBooleanMethodA(environment, globalFuture, _JNIMethodIDCache.CompletableFuture.complete, [jvalue(l: boxedResult$)])
252252 }
253253 }
254- return
254+ return
255255 }
256256 """
257257 ]
@@ -263,7 +263,7 @@ struct JNIAsyncTests {
263263 try assertOutput (
264264 input: """
265265 class MyClass { }
266-
266+
267267 public func async(c: MyClass) async -> MyClass
268268 """ ,
269269 . jni, . java,
@@ -297,15 +297,15 @@ struct JNIAsyncTests {
297297 try assertOutput (
298298 input: """
299299 class MyClass { }
300-
300+
301301 public func async(c: MyClass) async -> MyClass
302302 """ ,
303303 . jni, . swift,
304304 detectChunkByInitialLines: 1 ,
305305 expectedChunks: [
306306 """
307307 @_cdecl( " Java_com_example_swift_SwiftModule__00024async__JLjava_util_concurrent_CompletableFuture_2 " )
308- func Java_com_example_swift_SwiftModule__00024async__JLjava_util_concurrent_CompletableFuture_2(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, c: jlong, result_future: jobject?) {
308+ public func Java_com_example_swift_SwiftModule__00024async__JLjava_util_concurrent_CompletableFuture_2(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, c: jlong, result_future: jobject?) {
309309 assert(c != 0, " c memory address was null " )
310310 let cBits$ = Int(Int64(fromJNI: c, in: environment))
311311 let c$ = UnsafeMutablePointer<MyClass>(bitPattern: cBits$)
@@ -348,7 +348,7 @@ struct JNIAsyncTests {
348348 _ = environment.interface.CallBooleanMethodA(environment, globalFuture, _JNIMethodIDCache.CompletableFuture.complete, [jvalue(l: boxedResult$)])
349349 }
350350 }
351- return
351+ return
352352 }
353353 """
354354 ]
@@ -392,7 +392,7 @@ struct JNIAsyncTests {
392392 expectedChunks: [
393393 """
394394 @_cdecl( " Java_com_example_swift_SwiftModule__00024async__Ljava_lang_String_2Ljava_util_concurrent_CompletableFuture_2 " )
395- func Java_com_example_swift_SwiftModule__00024async__Ljava_lang_String_2Ljava_util_concurrent_CompletableFuture_2(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, s: jstring?, result_future: jobject?) {
395+ public func Java_com_example_swift_SwiftModule__00024async__Ljava_lang_String_2Ljava_util_concurrent_CompletableFuture_2(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, s: jstring?, result_future: jobject?) {
396396 let s = environment.interface.NewGlobalRef(environment, s)
397397 let globalFuture = environment.interface.NewGlobalRef(environment, result_future)
398398 ...
@@ -418,7 +418,7 @@ struct JNIAsyncTests {
418418 try assertOutput (
419419 input: """
420420 class MyClass { }
421-
421+
422422 public func async(c: MyClass) async -> MyClass
423423 """ ,
424424 config: config,
@@ -450,7 +450,7 @@ struct JNIAsyncTests {
450450 try assertOutput (
451451 input: """
452452 class MyClass { }
453-
453+
454454 public func async(c: MyClass) async -> MyClass
455455 """ ,
456456 config: config,
@@ -459,15 +459,15 @@ struct JNIAsyncTests {
459459 expectedChunks: [
460460 """
461461 @_cdecl( " Java_com_example_swift_SwiftModule__00024async__JLorg_swift_swiftkit_core_SimpleCompletableFuture_2 " )
462- func Java_com_example_swift_SwiftModule__00024async__JLorg_swift_swiftkit_core_SimpleCompletableFuture_2(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, c: jlong, result_future: jobject?) {
462+ public func Java_com_example_swift_SwiftModule__00024async__JLorg_swift_swiftkit_core_SimpleCompletableFuture_2(environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, c: jlong, result_future: jobject?) {
463463 ...
464464 var task: Task<Void, Never>? = nil
465465 ...
466466 _ = environment.interface.CallBooleanMethodA(environment, globalFuture, _JNIMethodIDCache.SimpleCompletableFuture.complete, [jvalue(l: boxedResult$)])
467- ...
467+ ...
468468 }
469469 """
470470 ]
471471 )
472472 }
473- }
473+ }
0 commit comments