Adds support for iOS 10.2

This commit is contained in:
Krunoslav Zaher 2016-12-17 23:11:05 +01:00
parent 5830c6faae
commit 1a82b57f87
2 changed files with 12 additions and 8 deletions

View File

@ -18,16 +18,20 @@ import XCTest
}
// there was a leak on versions prior to 10.2
extension UISwitchTests {
func testSwitch_ValueCompletesOnDealloc() {
let createView: () -> UISwitch = { UISwitch(frame: CGRect(x: 0, y: 0, width: 1, height: 1)) }
ensurePropertyDeallocated(createView, true) { (view: UISwitch) in view.rx.value }
if #available(iOS 10.2, *) {
let createView: () -> UISwitch = { UISwitch(frame: CGRect(x: 0, y: 0, width: 1, height: 1)) }
ensurePropertyDeallocated(createView, true) { (view: UISwitch) in view.rx.value }
}
}
func testSwitch_isOnCompletesOnDealloc() {
let createView: () -> UISwitch = { UISwitch(frame: CGRect(x: 0, y: 0, width: 1, height: 1)) }
ensurePropertyDeallocated(createView, true) { (view: UISwitch) in view.rx.isOn }
if #available(iOS 10.2, *) {
let createView: () -> UISwitch = { UISwitch(frame: CGRect(x: 0, y: 0, width: 1, height: 1)) }
ensurePropertyDeallocated(createView, true) { (view: UISwitch) in view.rx.isOn }
}
}
}

View File

@ -21,8 +21,8 @@ BOLDWHITE="\033[1m\033[37m"
# make sure all tests are passing
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-10-1 | wc -l` -eq 1 ]; then
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/10.1
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.iOS-10-2 | wc -l` -eq 1 ]; then
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/10.2
else
DEFAULT_IOS_SIMULATOR=RxSwiftTest/iPhone-6/iOS/10.0
fi
@ -33,7 +33,7 @@ else
DEFAULT_WATCHOS_SIMULATOR=RxSwiftTest/Apple-Watch-38mm/watchOS/3.0
fi
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-10-1 | wc -l` -eq 1 ]; then
if [ `xcrun simctl list runtimes | grep com.apple.CoreSimulator.SimRuntime.tvOS-10-2 | wc -l` -eq 1 ]; then
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/10.1
else
DEFAULT_TVOS_SIMULATOR=RxSwiftTest/Apple-TV-1080p/tvOS/10.0