Skip to content

Commit

Permalink
Update tests for Apple Watch Series 10
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentneo committed Sep 13, 2024
1 parent 9b68f35 commit 1f312d4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Tests/DeviceModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -647,5 +647,16 @@ class DeviceModelTests: XCTestCase {
XCTAssert(deviceModel == .ultra2, "DeviceModel - .ultra2 is failing")
}

func testDeviceModelWatchSeries10() {
let deviceModel1 = DeviceModel(identifier: Identifier("Watch7,8"))
let deviceModel2 = DeviceModel(identifier: Identifier("Watch7,9"))
let deviceModel3 = DeviceModel(identifier: Identifier("Watch7,10"))
let deviceModel4 = DeviceModel(identifier: Identifier("Watch7,11"))
XCTAssert(deviceModel1 == .series10, "DeviceModel - .series10 is failing")
XCTAssert(deviceModel2 == .series10, "DeviceModel - .series10 is failing")
XCTAssert(deviceModel3 == .series10, "DeviceModel - .series10 is failing")
XCTAssert(deviceModel4 == .series10, "DeviceModel - .series10 is failing")
}

#endif
}
16 changes: 16 additions & 0 deletions Tests/IdentifierTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -790,5 +790,21 @@ class IdentifierTests: XCTestCase {
XCTAssert(Identifier("Watch7,5").description == "Apple Watch Ultra 2", "Watch7,5 is failing to produce a common device model string")
}

func testDisplayStringWatch7v8() {
XCTAssert(Identifier("Watch7,8").description == "Apple Watch Series 10, 42mm case (GPS)", "Watch7,8 is failing to produce a common device model string")
}

func testDisplayStringWatch7v9() {
XCTAssert(Identifier("Watch7,9").description == "Apple Watch Series 10, 46mm case (GPS)", "Watch7,9 is failing to produce a common device model string")
}

func testDisplayStringWatch7v10() {
XCTAssert(Identifier("Watch7,10").description == "Apple Watch Series 10, 42mm case (GPS + Cellular)", "Watch7,10 is failing to produce a common device model string")
}

func testDisplayStringWatch7v11() {
XCTAssert(Identifier("Watch7,11").description == "Apple Watch Series 10, 46mm case (GPS + Cellular)", "Watch7,11 is failing to produce a common device model string")
}

#endif
}

0 comments on commit 1f312d4

Please sign in to comment.