public void Setup() { #if __WATCHOS__ // watchOS 3.0+ TestRuntime.CheckWatchOSSystemVersion(3, 0); #else // iOS 7.0+ macOS 10.9+ tvOS 9.0+ TestRuntime.AssertXcodeVersion(5, 0); #endif }
public void SetUp() { #if __WATCHOS__ if (!TestRuntime.CheckWatchOSSystemVersion(3, 0)) { Assert.Inconclusive("Requires watchOS 3.0+"); } #else if (!TestRuntime.CheckSystemAndSDKVersion(7, 0)) { Assert.Inconclusive("Requires iOS 7.0+"); } #endif }
protected override bool SkipAssembly(Assembly a) { // we only want to check this on a version of iOS that // 1. is the current SDK target (or a newer one) var sdk = new Version(Constants.SdkVersion); #if __WATCHOS__ if (!TestRuntime.CheckWatchOSSystemVersion(sdk.Major, sdk.Minor)) { return(true); } #elif __IOS__ || __TVOS__ if (!UIDevice.CurrentDevice.CheckSystemVersion(sdk.Major, sdk.Minor)) { return(true); } #else #error unknown target #endif // 2. on the real target for Xamarin.iOS.dll/monotouch.dll // as the simulator miss some libraries and symbols // but the rest of the BCL is fine to test return(a == typeof(NSObject).Assembly && (Runtime.Arch == Arch.SIMULATOR)); }