[monotouch-test] Attempt to fix monotouch-tests on macOS 10.15. (#14520)

This commit is contained in:
Rolf Bjarne Kvinge 2022-03-29 07:51:40 +02:00 коммит произвёл GitHub
Родитель 50192c9f96
Коммит 2af5fc3c56
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 6 добавлений и 18 удалений

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

@ -37,7 +37,11 @@ namespace MonoTouchFixtures.HealthKit {
Assert.That (details.ValidationError.Length, Is.EqualTo ((nint) 0), "Length");
}
};
#if __MACCATALYST__
var throwsException = TestRuntime.CheckXcodeVersion (12, 0);
#else
var throwsException = TestRuntime.CheckXcodeVersion (11, 0);
#endif
if (throwsException) {
#if NET

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

@ -95,11 +95,7 @@ namespace MonoTouchFixtures.MediaAccessibility {
Assert.Null (e, "ro / set / no error"); // weird, it can't be saved back to the file metadata
var s = MAImageCaptioning.GetCaption (url, out e);
#if __MACCATALYST__
if (true) {
#else
if (TestRuntime.CheckXcodeVersion (12, TestRuntime.MinorXcode12APIMismatch)) {
#endif
Assert.AreEqual ("xamarin", s, "ro / roundtrip 2");
} else {
Assert.Null (s, "ro / roundtrip 3"); // not very surprising since Set can't save it
@ -108,11 +104,7 @@ namespace MonoTouchFixtures.MediaAccessibility {
Assert.True (MAImageCaptioning.SetCaption (url, "xamarin", out e), "Set 2");
s = MAImageCaptioning.GetCaption (url, out e);
#if __MACCATALYST__
if (true) {
#else
if (TestRuntime.CheckXcodeVersion (12, TestRuntime.MinorXcode12APIMismatch)) {
#endif
Assert.AreEqual ("xamarin", s, "ro / back to original");
} else {
Assert.Null (s, "ro / back to original");
@ -135,11 +127,7 @@ namespace MonoTouchFixtures.MediaAccessibility {
Assert.Null (e, "rw / set / no error"); // weird, it can't be saved back to the file metadata
var s = MAImageCaptioning.GetCaption (rw_url, out e);
#if __MACCATALYST__
if (true) {
#else
if (TestRuntime.CheckXcodeVersion (12, TestRuntime.MinorXcode12APIMismatch)) {
#endif
Assert.AreEqual ("xamarin", s, "rw / roundtrip"); // :)
} else {
Assert.Null (s, "rw / roundtrip"); // :(
@ -148,11 +136,7 @@ namespace MonoTouchFixtures.MediaAccessibility {
Assert.True (MAImageCaptioning.SetCaption (rw_url, "xamarin", out e), "Set 2");
s = MAImageCaptioning.GetCaption (rw_url, out e);
#if __MACCATALYST__
if (true) {
#else
if (TestRuntime.CheckXcodeVersion (12, TestRuntime.MinorXcode12APIMismatch)) {
#endif
Assert.AreEqual ("xamarin", s, "rw / back to original");
} else {
Assert.Null (s, "rw / back to original");