From b39f3ac92dc5024cdab9307fe651b44d006d8da7 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Wed, 4 Aug 2021 08:48:47 -0400 Subject: [PATCH] [xcode13] Fix catalyst intro tests on macOS 12 (#12339) Move a few macOS special cases into base class so they will apply to Catalyst too. --- tests/introspection/ApiSelectorTest.cs | 9 +++++++++ tests/introspection/Mac/MacApiSelectorTest.cs | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/introspection/ApiSelectorTest.cs b/tests/introspection/ApiSelectorTest.cs index fd6f3d8d90..5e774f68c8 100644 --- a/tests/introspection/ApiSelectorTest.cs +++ b/tests/introspection/ApiSelectorTest.cs @@ -835,6 +835,11 @@ namespace Introspection { break; } break; + case "NSTask": + // category, NSTask won't respond -> @interface NSTask (NSTaskConveniences) + if (selectorName == "waitUntilExit") + return true; + break; } // old binding mistake @@ -1063,6 +1068,10 @@ namespace Introspection { case "initWithDataIgnoringOrientation:": var mi = m as MethodInfo; return mi != null && !mi.IsPublic && mi.ReturnType.Name == "IntPtr"; + // NSAppleEventDescriptor + case "initListDescriptor": + case "initRecordDescriptor": + return true; default: return false; } diff --git a/tests/introspection/Mac/MacApiSelectorTest.cs b/tests/introspection/Mac/MacApiSelectorTest.cs index f15aeb5d0e..8bff70e8dc 100644 --- a/tests/introspection/Mac/MacApiSelectorTest.cs +++ b/tests/introspection/Mac/MacApiSelectorTest.cs @@ -155,11 +155,6 @@ namespace Introspection { // compat. return true; #endif - case "waitUntilExit": - // category, NSTask won't respond -> @interface NSTask (NSTaskConveniences) - if (type.Name == "NSTask") - return true; - break; case "readInBackgroundAndNotifyForModes:": case "readInBackgroundAndNotify": case "readToEndOfFileInBackgroundAndNotifyForModes:": @@ -1283,9 +1278,6 @@ namespace Introspection { // QTMovie case "movieWithTimeRange:error:": case "initWithQuickTimeMedia:error:": - // NSAppleEventDescriptor - case "initListDescriptor": - case "initRecordDescriptor": // NSAnimation case "initWithDuration:animationCurve:": return true;