Merge pull request #254 from jonreid/master

Update Swift Package Manager, clean up starting test, add README
This commit is contained in:
Emily Bache authored and GitHub committed 2021-08-23 07:31:21 +02:00
commit 045597940b
3 files changed
+18 -8

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
// swift-tools-version:5.1 // swift-tools-version:5.3
import PackageDescription import PackageDescription
+12
View File
@@ -0,0 +1,12 @@
## Build and test using any of the following
Command line:
- `swift test`
Xcode:
- Open this "swift" folder to open package
- In the Xcode menu, select Product > Test to run tests
AppCode:
- Open this "swift" folder to open package
- Select "GildedRoseTests" configuration and run
@@ -3,16 +3,14 @@ import XCTest
class GildedRoseTests: XCTestCase { class GildedRoseTests: XCTestCase {
func testFoo() { func testFoo() throws {
let items = [Item(name: "foo", sellIn: 0, quality: 0)] let items = [Item(name: "foo", sellIn: 0, quality: 0)]
let app = GildedRose(items: items); let app = GildedRose(items: items)
app.updateQuality(); app.updateQuality()
XCTAssertEqual("fixme", app.items[0].name); XCTAssertEqual(app.items[0].name, "fixme")
} }
static var allTests : [(String, (GildedRoseTests) -> () throws -> Void)] { static var allTests = [
return [
("testFoo", testFoo), ("testFoo", testFoo),
] ]
} }
}