22//
33// This source file is part of the Swift open source project
44//
5- // Copyright (c) 2014-2023 Apple Inc. and the Swift project authors
5+ // Copyright (c) 2014-2024 Apple Inc. and the Swift project authors
66// Licensed under Apache License v2.0 with Runtime Library Exception
77//
88// See http://swift.org/LICENSE.txt for license information
@@ -16,7 +16,7 @@ import PackageModel
1616import Workspace
1717import XCTest
1818
19- class InitTests : XCTestCase {
19+ final class InitTests : XCTestCase {
2020
2121 // MARK: TSCBasic package creation for each package type.
2222
@@ -53,8 +53,10 @@ class InitTests: XCTestCase {
5353 XCTAssertMatch ( manifestContents, . contains( packageWithNameOnly ( named: name) ) )
5454 }
5555 }
56-
57- func testInitPackageExecutable( ) throws {
56+
57+ func testInitPackageExecutable( ) async throws {
58+ try await UserToolchain . default. skipUnlessSwiftVersion ( major: 6 , minor: 0 )
59+
5860 try testWithTemporaryDirectory { tmpPath in
5961 let fs = localFileSystem
6062 let path = tmpPath. appending ( " Foo " )
@@ -98,7 +100,9 @@ class InitTests: XCTestCase {
98100 }
99101 }
100102
101- func testInitPackageLibraryWithXCTestOnly( ) throws {
103+ func testInitPackageLibraryWithXCTestOnly( ) async throws {
104+ try await UserToolchain . default. skipUnlessSwiftVersion ( major: 6 , minor: 0 )
105+
102106 try testWithTemporaryDirectory { tmpPath in
103107 let fs = localFileSystem
104108 let path = tmpPath. appending ( " Foo " )
@@ -148,7 +152,7 @@ class InitTests: XCTestCase {
148152 XCTAssertFileExists ( path. appending ( components: " .build " , triple. platformBuildPathComponent, " debug " , " Modules " , " Foo.swiftmodule " ) )
149153 }
150154 }
151-
155+
152156 func testInitPackageLibraryWithSwiftTestingOnly( ) throws {
153157 try testWithTemporaryDirectory { tmpPath in
154158 let fs = localFileSystem
@@ -235,7 +239,9 @@ class InitTests: XCTestCase {
235239 }
236240 }
237241
238- func testInitPackageLibraryWithNoTests( ) throws {
242+ func testInitPackageLibraryWithNoTests( ) async throws {
243+ try await UserToolchain . default. skipUnlessSwiftVersion ( major: 6 , minor: 0 )
244+
239245 try testWithTemporaryDirectory { tmpPath in
240246 let fs = localFileSystem
241247 let path = tmpPath. appending ( " Foo " )
@@ -339,8 +345,9 @@ class InitTests: XCTestCase {
339345 }
340346
341347 // MARK: Special case testing
342-
343- func testInitPackageNonc99Directory( ) throws {
348+
349+ func testInitPackageNonc99Directory( ) async throws {
350+ try await UserToolchain . default. skipUnlessSwiftVersion ( major: 6 , minor: 0 )
344351 try withTemporaryDirectory ( removeTreeOnDeinit: true ) { tempDirPath in
345352 XCTAssertDirectoryExists ( tempDirPath)
346353
@@ -367,7 +374,9 @@ class InitTests: XCTestCase {
367374 }
368375 }
369376
370- func testNonC99NameExecutablePackage( ) throws {
377+ func testNonC99NameExecutablePackage( ) async throws {
378+ try await UserToolchain . default. skipUnlessSwiftVersion ( major: 6 , minor: 0 )
379+
371380 try withTemporaryDirectory ( removeTreeOnDeinit: true ) { tempDirPath in
372381 XCTAssertDirectoryExists ( tempDirPath)
373382
0 commit comments