From 1f312d4dde3ba7c7543f99670488ff7fb12c58f7 Mon Sep 17 00:00:00 2001 From: Vincent Neo <23420208+vincentneo@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:27:51 +0800 Subject: [PATCH] Update tests for Apple Watch Series 10 --- Tests/DeviceModelTests.swift | 11 +++++++++++ Tests/IdentifierTests.swift | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/Tests/DeviceModelTests.swift b/Tests/DeviceModelTests.swift index 020e47c..aad97de 100644 --- a/Tests/DeviceModelTests.swift +++ b/Tests/DeviceModelTests.swift @@ -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 } diff --git a/Tests/IdentifierTests.swift b/Tests/IdentifierTests.swift index dd37292..3c1fd75 100644 --- a/Tests/IdentifierTests.swift +++ b/Tests/IdentifierTests.swift @@ -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 }