Update the Swift starting point

- Ignore the generated Xcode project from the repositiory
- Bump the swift tools version to 5.5 (supported by Xcode 13+)
- Tidy the Tests. LinuxMain, XCTestManifests and the allTests array are no longer needed as tests
- are auto-discovered on non-apple platforms
This commit is contained in:
Abizer Nasir 2021-11-21 17:41:38 +00:00
parent 1a81118c63
commit 080738a8b2
5 changed files with 3 additions and 21 deletions

2
swift/.gitignore vendored
View File

@ -3,3 +3,5 @@
/Packages /Packages
/*.xcodeproj /*.xcodeproj
xcuserdata/ xcuserdata/
DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

View File

@ -1,4 +1,4 @@
// swift-tools-version:5.3 // swift-tools-version:5.5
import PackageDescription import PackageDescription

View File

@ -9,8 +9,4 @@ class GildedRoseTests: XCTestCase {
app.updateQuality() app.updateQuality()
XCTAssertEqual(app.items[0].name, "fixme") XCTAssertEqual(app.items[0].name, "fixme")
} }
static var allTests = [
("testFoo", testFoo),
]
} }

View File

@ -1,9 +0,0 @@
import XCTest
#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(GildedRoseTests.allTests),
]
}
#endif

View File

@ -1,7 +0,0 @@
import XCTest
import GildedRoseTests
var tests = [XCTestCaseEntry]()
tests += GildedRoseTests.allTests()
XCTMain(tests)