mirror of
https://github.com/ReactiveX/RxSwift.git
synced 2024-10-05 22:47:15 +03:00
Adds support for iOS 10.2
This commit is contained in:
parent
5830c6faae
commit
1a82b57f87
@ -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 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user