Skip to content

Commit

Permalink
Added all iPhones 15 & 16 to Device.
Browse files Browse the repository at this point in the history
  • Loading branch information
Toni77777 committed Oct 30, 2024
1 parent b520d1b commit 8360b9d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/PreviewDevice/Device.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ public enum Device: String {
case iphone14Plus = "iPhone 14 Plus"
case iphone14Pro = "iPhone 14 Pro"
case iphone14ProMax = "iPhone 14 Pro Max"
case iphone15 = "iPhone 15"
case iphone15Plus = "iPhone 15 Plus"
case iphone15Pro = "iPhone 15 Pro"
case iphone15ProMax = "iPhone 15 Pro Max"
case iphone16 = "iPhone 16"
case iphone16Plus = "iPhone 16 Plus"
case iphone16Pro = "iPhone 16 Pro"
case iphone16ProMax = "iPhone 16 Pro Max"

// MARK: - iPad

Expand Down
22 changes: 22 additions & 0 deletions Tests/PreviewDeviceTests/DeviceIphoneTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,26 @@ final class DeviceIphoneTests: XCTestCase {
let iphone: Device = .iphone14ProMax
XCTAssertEqual(iphone.rawValue, "iPhone 14 Pro Max")
}

// MARK: - Iphone 15, 15 Plus, 15 Pro, 15 Pro Max

func testIphone15HasCorrectName() {
let iphone: Device = .iphone15
XCTAssertEqual(iphone.rawValue, "iPhone 15")
}

func testIphone15PlusHasCorrectName() {
let iphone: Device = .iphone15Plus
XCTAssertEqual(iphone.rawValue, "iPhone 15 Plus")
}

func testIphone15ProHasCorrectName() {
let iphone: Device = .iphone15Pro
XCTAssertEqual(iphone.rawValue, "iPhone 15 Pro")
}

func testIphone15ProMaxHasCorrectName() {
let iphone: Device = .iphone15ProMax
XCTAssertEqual(iphone.rawValue, "iPhone 15 Pro Max")
}
}

0 comments on commit 8360b9d

Please sign in to comment.