Skip to content

Commit e42ae03

Browse files
committed
adjust tests to new codegen
1 parent 81e0299 commit e42ae03

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Tests/JExtractSwiftTests/JNI/JNIAsyncTests.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ struct JNIAsyncTests {
6969
environment.interface.DeleteGlobalRef(deferEnvironment, globalFuture)
7070
}
7171
let swiftResult$ = await SwiftModule.asyncVoid()
72-
environment = try JavaVirtualMachine.shared().environment()
72+
environment = try! JavaVirtualMachine.shared().environment()
7373
environment.interface.CallBooleanMethodA(environment, globalFuture, _JNIMethodIDCache.CompletableFuture.complete, [jvalue(l: nil)])
7474
}
7575
}
@@ -82,7 +82,7 @@ struct JNIAsyncTests {
8282
environment.interface.DeleteGlobalRef(deferEnvironment, globalFuture)
8383
}
8484
let swiftResult$ = await SwiftModule.asyncVoid()
85-
environment = try JavaVirtualMachine.shared().environment()
85+
environment = try! JavaVirtualMachine.shared().environment()
8686
environment.interface.CallBooleanMethodA(environment, globalFuture, _JNIMethodIDCache.CompletableFuture.complete, [jvalue(l: nil)])
8787
}
8888
}
@@ -144,7 +144,7 @@ struct JNIAsyncTests {
144144
}
145145
do {
146146
let swiftResult$ = await try SwiftModule.async()
147-
environment = try JavaVirtualMachine.shared().environment()
147+
environment = try! JavaVirtualMachine.shared().environment()
148148
environment.interface.CallBooleanMethodA(environment, globalFuture, _JNIMethodIDCache.CompletableFuture.complete, [jvalue(l: nil)])
149149
}
150150
catch {
@@ -164,7 +164,7 @@ struct JNIAsyncTests {
164164
}
165165
do {
166166
let swiftResult$ = await try SwiftModule.async()
167-
environment = try JavaVirtualMachine.shared().environment()
167+
environment = try! JavaVirtualMachine.shared().environment()
168168
environment.interface.CallBooleanMethodA(environment, globalFuture, _JNIMethodIDCache.CompletableFuture.complete, [jvalue(l: nil)])
169169
}
170170
catch {
@@ -231,7 +231,7 @@ struct JNIAsyncTests {
231231
environment.interface.DeleteGlobalRef(deferEnvironment, globalFuture)
232232
}
233233
let swiftResult$ = await SwiftModule.async(i: Int64(fromJNI: i, in: environment))
234-
environment = try JavaVirtualMachine.shared().environment()
234+
environment = try! JavaVirtualMachine.shared().environment()
235235
let boxedResult$ = SwiftJavaRuntimeSupport._JNIBoxedConversions.box(swiftResult$.getJNIValue(in: environment), in: environment)
236236
environment.interface.CallBooleanMethodA(environment, globalFuture, _JNIMethodIDCache.CompletableFuture.complete, [jvalue(l: boxedResult$)])
237237
}
@@ -245,7 +245,7 @@ struct JNIAsyncTests {
245245
environment.interface.DeleteGlobalRef(deferEnvironment, globalFuture)
246246
}
247247
let swiftResult$ = await SwiftModule.async(i: Int64(fromJNI: i, in: environment))
248-
environment = try JavaVirtualMachine.shared().environment()
248+
environment = try! JavaVirtualMachine.shared().environment()
249249
let boxedResult$ = SwiftJavaRuntimeSupport._JNIBoxedConversions.box(swiftResult$.getJNIValue(in: environment), in: environment)
250250
environment.interface.CallBooleanMethodA(environment, globalFuture, _JNIMethodIDCache.CompletableFuture.complete, [jvalue(l: boxedResult$)])
251251
}
@@ -322,7 +322,7 @@ struct JNIAsyncTests {
322322
environment.interface.DeleteGlobalRef(deferEnvironment, globalFuture)
323323
}
324324
let swiftResult$ = await SwiftModule.async(c: c$.pointee)
325-
environment = try JavaVirtualMachine.shared().environment()
325+
environment = try! JavaVirtualMachine.shared().environment()
326326
let result$ = UnsafeMutablePointer<MyClass>.allocate(capacity: 1)
327327
result$.initialize(to: swiftResult$)
328328
let resultBits$ = Int64(Int(bitPattern: result$))
@@ -339,7 +339,7 @@ struct JNIAsyncTests {
339339
environment.interface.DeleteGlobalRef(deferEnvironment, globalFuture)
340340
}
341341
let swiftResult$ = await SwiftModule.async(c: c$.pointee)
342-
environment = try JavaVirtualMachine.shared().environment()
342+
environment = try! JavaVirtualMachine.shared().environment()
343343
let result$ = UnsafeMutablePointer<MyClass>.allocate(capacity: 1)
344344
result$.initialize(to: swiftResult$)
345345
let resultBits$ = Int64(Int(bitPattern: result$))

0 commit comments

Comments
 (0)