From 4696bb2523ef856f4647237c629d40a0aa55ea14 Mon Sep 17 00:00:00 2001 From: Pere Bohigas Date: Thu, 11 Apr 2024 20:58:33 +0200 Subject: [PATCH] Add concurrency to tests --- .../SwiftPolyglotCoreTests.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Tests/SwiftPolyglotCoreTests/SwiftPolyglotCoreTests.swift b/Tests/SwiftPolyglotCoreTests/SwiftPolyglotCoreTests.swift index ab86650..081e88d 100644 --- a/Tests/SwiftPolyglotCoreTests/SwiftPolyglotCoreTests.swift +++ b/Tests/SwiftPolyglotCoreTests/SwiftPolyglotCoreTests.swift @@ -2,7 +2,7 @@ import XCTest final class SwiftPolyglotCoreTests: XCTestCase { - func testStringCatalogFullyTranslated() throws { + func testStringCatalogFullyTranslated() async throws { guard let stringCatalogFilePath = Bundle.module.path( forResource: "FullyTranslated", @@ -21,10 +21,10 @@ final class SwiftPolyglotCoreTests: XCTestCase { isRunningInAGitHubAction: false ) - XCTAssertNoThrow(try swiftPolyglotCore.run()) + await XCTAssertNoThrowAsync(try await swiftPolyglotCore.run()) } - func testStringCatalogVariationsFullyTranslated() throws { + func testStringCatalogVariationsFullyTranslated() async throws { guard let stringCatalogFilePath = Bundle.module.path( forResource: "VariationsFullyTranslated", @@ -43,10 +43,10 @@ final class SwiftPolyglotCoreTests: XCTestCase { isRunningInAGitHubAction: false ) - XCTAssertNoThrow(try swiftPolyglotCore.run()) + await XCTAssertNoThrowAsync(try await swiftPolyglotCore.run()) } - func testStringCatalogWithMissingTranslations() throws { + func testStringCatalogWithMissingTranslations() async throws { guard let stringCatalogFilePath = Bundle.module.path( forResource: "WithMissingTranslations", @@ -65,10 +65,10 @@ final class SwiftPolyglotCoreTests: XCTestCase { isRunningInAGitHubAction: false ) - XCTAssertThrowsError(try swiftPolyglotCore.run()) + await XCTAssertThrowsErrorAsync(try await swiftPolyglotCore.run()) } - func testStringCatalogWithMissingVariations() throws { + func testStringCatalogWithMissingVariations() async throws { guard let stringCatalogFilePath = Bundle.module.path( forResource: "VariationsWithMissingTranslations", @@ -87,6 +87,6 @@ final class SwiftPolyglotCoreTests: XCTestCase { isRunningInAGitHubAction: false ) - XCTAssertThrowsError(try swiftPolyglotCore.run()) + await XCTAssertThrowsErrorAsync(try await swiftPolyglotCore.run()) } }