File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed
Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -70,28 +70,6 @@ struct JNIProtocolTests {
7070 ] )
7171 }
7272
73- @Test
74- func emitsDefault( ) throws {
75- try assertOutput (
76- input: source,
77- config: config,
78- . jni, . java,
79- detectChunkByInitialLines: 1 ,
80- expectedChunks: [
81- """
82- public interface SomeProtocol {
83- ...
84- public default SomeClass withObject(SomeClass c) {
85- return withObject(c, SwiftMemoryManagement.GLOBAL_SWIFT_JAVA_ARENA);
86- }
87- ...
88- public SomeClass withObject(SomeClass c, SwiftArena swiftArena$);
89- ...
90- }
91- """
92- ] )
93- }
94-
9573 @Test
9674 func generatesJavaClassWithExtends( ) throws {
9775 try assertOutput (
@@ -329,7 +307,7 @@ struct JNIProtocolTests {
329307 let cClass = try! JavaClass<JavaSomeClass>(environment: JavaVirtualMachine.shared().environment())
330308 let cPointer = UnsafeMutablePointer<SomeClass>.allocate(capacity: 1)
331309 cPointer.initialize(to: c)
332- guard let unwrapped$ = _javaSomeProtocolInterface.withObject(cClass.wrapMemoryAddressUnsafe(Int64(Int(bitPattern: cPointer)))) else {
310+ guard let unwrapped$ = _javaSomeProtocolInterface.withObject(cClass.wrapMemoryAddressUnsafe(Int64(Int(bitPattern: cPointer))), JNI.shared.globalArena ) else {
333311 fatalError( " Upcall to withObject unexpectedly returned nil " )
334312 }
335313 let result$MemoryAddress$ = unwrapped$.as(JavaJNISwiftInstance.self)!.memoryAddress()
You can’t perform that action at this time.
0 commit comments