@@ -17,24 +17,25 @@ import Testing
1717
1818@Suite
1919struct JNIVariablesTests {
20- let membersSource = """
20+ let membersSource =
21+ """
2122 public class MyClass {
22- public let constant: Int64
23- public var mutable: Int64
24- public var computed: Int64 {
25- return 0
26- }
27- public var computedThrowing: Int64 {
28- get throws { return 0 }
29- }
30- public var getterAndSetter: Int64 {
31- get { return 0 }
32- set { }
33- }
23+ public let constant: Int64
24+ public var mutable: Int64
25+ public var computed: Int64 {
26+ return 0
27+ }
28+ public var computedThrowing: Int64 {
29+ get throws { return 0 }
30+ }
31+ public var getterAndSetter: Int64 {
32+ get { return 0 }
33+ set { }
34+ }
3435 public var someBoolean: Bool
3536 public let isBoolean: Bool
3637 }
37- """
38+ """
3839
3940 @Test
4041 func constant_javaBindings( ) throws {
@@ -341,16 +342,16 @@ struct JNIVariablesTests {
341342 * public var someBoolean: Bool
342343 * }
343344 */
344- public void setIsSomeBoolean (boolean newValue) {
345+ public void setSomeBoolean (boolean newValue) {
345346 long selfPointer = this.pointer();
346- MyClass.$setIsSomeBoolean (newValue, selfPointer);
347+ MyClass.$setSomeBoolean (newValue, selfPointer);
347348 }
348349 """ ,
349350 """
350351 private static native boolean $isSomeBoolean(long selfPointer);
351352 """ ,
352353 """
353- private static native void $setIsSomeBoolean (boolean newValue, long selfPointer);
354+ private static native void $setSomeBoolean (boolean newValue, long selfPointer);
354355 """
355356 ]
356357 )
@@ -373,14 +374,13 @@ struct JNIVariablesTests {
373374 }
374375 """ ,
375376 """
376- @_cdecl( " Java_com_example_swift_MyClass__00024setIsSomeBoolean__ZJ " )
377- func Java_com_example_swift_MyClass__00024setIsSomeBoolean__ZJ (environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, newValue: jboolean, selfPointer: jlong) {
377+ @_cdecl( " Java_com_example_swift_MyClass__00024setSomeBoolean__ZJ " )
378+ func Java_com_example_swift_MyClass__00024setSomeBoolean__ZJ (environment: UnsafeMutablePointer<JNIEnv?>!, thisClass: jclass, newValue: jboolean, selfPointer: jlong) {
378379 let self$ = UnsafeMutablePointer<MyClass>(bitPattern: Int(Int64(fromJNI: selfPointer, in: environment!)))!
379380 self$.pointee.someBoolean = Bool(fromJNI: newValue, in: environment!)
380381 }
381382 """
382383 ]
383384 )
384385 }
385-
386386}
0 commit comments