[Tests] Fix failing tests on iOS 8. Fixes #4437 (#4592)

Some of the tests fail because the assert is looking at the wrong iOS
version. Looking at the API definitions:

* UIStackView - Available in iOS 9, not iOS 8.
* AudioServicesPlayAlertSoundWithCompletion - Available in iOS 9, not
iOS 8.

All the other tests reported in the issue pass.

Issue: https://github.com/xamarin/xamarin-macios/issues/4437
This commit is contained in:
Manuel de la Pena 2018-08-08 16:14:04 +02:00 коммит произвёл GitHub
Родитель 8960cc0022
Коммит 82d21bc211
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -97,7 +97,7 @@ namespace MonoTouchFixtures.AudioToolbox {
[Test]
public void TestCallbackPlayAlert ()
{
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
TestRuntime.AssertSystemVersion (PlatformName.iOS, 9, 0, throwIfOtherPlatform: false);
string path = Path.Combine (NSBundle.MainBundle.ResourcePath, "drum01.mp3");

Просмотреть файл

@ -40,7 +40,7 @@ namespace MonoTouchFixtures.UIKit {
[Test]
public void InitWithFrameTest ()
{
TestRuntime.AssertSystemVersion (PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
TestRuntime.AssertSystemVersion (PlatformName.iOS, 9, 0, throwIfOtherPlatform: false);
UIStackView stack = new UIStackView (new RectangleF (0, 0, 10, 10));
Assert.NotNull (stack, "UIStackView ctor(CGRect)");