Skip to content

Commit 6d4c9f1

Browse files
committed
async'ify the XCTest test cases so they can hop to the main actor
1 parent 4839648 commit 6d4c9f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/JavaKitTests/BasicRuntimeTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let jvm = try! JavaVirtualMachine(vmOptions: [])
2222

2323
@MainActor
2424
class BasicRuntimeTests: XCTestCase {
25-
func testJavaObjectManagement() throws {
25+
func testJavaObjectManagement() async throws {
2626
if isLinux {
2727
throw XCTSkip("Attempts to refcount a null pointer on Linux")
2828
}
@@ -51,7 +51,7 @@ class BasicRuntimeTests: XCTestCase {
5151
XCTAssert(url.javaHolder === urlAgain.javaHolder)
5252
}
5353

54-
func testJavaExceptionsInSwift() throws {
54+
func testJavaExceptionsInSwift() async throws {
5555
if isLinux {
5656
throw XCTSkip("Attempts to refcount a null pointer on Linux")
5757
}
@@ -63,7 +63,7 @@ class BasicRuntimeTests: XCTestCase {
6363
}
6464
}
6565

66-
func testStaticMethods() throws {
66+
func testStaticMethods() async throws {
6767
if isLinux {
6868
throw XCTSkip("Attempts to refcount a null pointer on Linux")
6969
}
@@ -72,7 +72,7 @@ class BasicRuntimeTests: XCTestCase {
7272
XCTAssert(urlConnectionClass.getDefaultAllowUserInteraction() == false)
7373
}
7474

75-
func testClassInstanceLookup() throws {
75+
func testClassInstanceLookup() async throws {
7676
do {
7777
_ = try JavaClass<Nonexistent>(in: jvm.environment)
7878
} catch {

0 commit comments

Comments
 (0)