Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
417-72KI committed Oct 4, 2023
1 parent 758f7be commit 5e8ff58
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Tests/Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,20 @@ class DeviceKitTests: XCTestCase {
XCTAssertFalse(UIDevice.current.isBatteryMonitoringEnabled)
}

func testHasDynamicIsland() {
let devicesHasDynamicIsland: [Device] = [
.iPhone14Pro, .iPhone14ProMax,
.iPhone15, .iPhone15Plus, .iPhone15Pro, .iPhone15ProMax,
]
XCTAssertTrue(devicesHasDynamicIsland.allSatisfy(\Device.hasDynamicIsland))

let devicesNotHaveDynamicIsland = (Device.allPhones + Device.allPads)
.filter { !devicesHasDynamicIsland.contains($0) }
XCTAssertTrue(devicesNotHaveDynamicIsland.allSatisfy {
!$0.hasDynamicIsland
})
}

// MARK: - volumes
@available(iOS 11.0, *)
func testVolumeTotalCapacity() {
Expand Down

0 comments on commit 5e8ff58

Please sign in to comment.