[tests] Skip font manager test in OS versions where it crashes due to bugs in the OS. (#6894)

Calls to CTFontManagerRegisterFontDescriptors with a null callback will crash
unless on iOS 13.1, so don't run this test on earlier OS versions.

Also update AssertXcodeVersion to cope with Xcode 11.1, which is unfortunately
just guesswork until an actual Xcode 11.1 is released (currently we can't
distinguish between iOS 13.0 and iOS 13.1 using the Xcode version, because
Xcode 11b7 supports them both, so for now we assume there will be an Xcode
11.1 which will support iOS 13.1).
This commit is contained in:
Rolf Bjarne Kvinge 2019-09-03 05:43:01 -07:00 коммит произвёл GitHub
Родитель 4b046c57db
Коммит 007f1e6882
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 13 добавлений и 2 удалений

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

@ -204,6 +204,18 @@ partial class TestRuntime
return CheckMacSystemVersion (10, 15, 0);
#else
throw new NotImplementedException ();
#endif
case 1: // This is guesswork until Apple actually releases an Xcode 11.1.
#if __WATCHOS__
return CheckWatchOSSystemVersion (6, 1);
#elif __TVOS__
return ChecktvOSSystemVersion (13, 1);
#elif __IOS__
return CheckiOSSystemVersion (13, 1);
#elif MONOMAC
return CheckMacSystemVersion (10, 15, 1);
#else
throw new NotImplementedException ();
#endif
default:
throw new NotImplementedException ();

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

@ -198,10 +198,9 @@ namespace MonoTouchFixtures.CoreText {
#if !__WATCHOS__
[Test]
[Ignore ("https://github.com/xamarin/maccore/issues/1898")]
public void RegisterFontDescriptors_NoCallback ()
{
TestRuntime.AssertXcodeVersion (11, 0);
TestRuntime.AssertXcodeVersion (11, 1); // Introduced in iOS 13.0, but with a bug that makes it crash. Apple fixed it for iOS 13.1
CTFontDescriptorAttributes fda = new CTFontDescriptorAttributes () {
FamilyName = "Courier",
StyleName = "Bold",