[introspection] Handle a few Metal classes differently for 'encodeWithCoder:'. Fixes #11885. (#11927)

The base ApiSelectorTest class already handles these selectors, and does it
almost right, so just remove this special case and fix the base class logic.

Fixes these failures on macOS 10.15:

    Introspection.MacApiSelectorTest
    	[FAIL] InstanceMethods :   4 errors found in 27001 instance selector validated:
    Selector not found for CoreML.MLDictionaryFeatureProvider : encodeWithCoder: in Void EncodeTo(Foundation.NSCoder) on CoreML.MLDictionaryFeatureProvider
    Selector not found for CoreML.MLMultiArray : encodeWithCoder: in Void EncodeTo(Foundation.NSCoder) on CoreML.MLMultiArray
    Selector not found for CoreML.MLFeatureValue : encodeWithCoder: in Void EncodeTo(Foundation.NSCoder) on CoreML.MLFeatureValue
    Selector not found for CoreML.MLSequence : encodeWithCoder: in Void EncodeTo(Foundation.NSCoder) on CoreML.MLSequence

Fixes https://github.com/xamarin/xamarin-macios/issues/11885.
This commit is contained in:
Rolf Bjarne Kvinge 2021-06-14 20:08:34 +02:00 коммит произвёл GitHub
Родитель 5211f5f0e5
Коммит 77a8299e8d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 1 добавлений и 11 удалений

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

@ -771,7 +771,7 @@ namespace Introspection {
case "MLSequence":
switch (selectorName) {
case "encodeWithCoder:":
if (!TestRuntime.CheckXcodeVersion (12, 0))
if (!TestRuntime.CheckXcodeVersion (12, TestRuntime.MinorXcode12APIMismatch))
return true;
break;
}

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

@ -138,16 +138,6 @@ namespace Introspection {
if (!Mac.CheckSystemVersion (10, 12)) // NSCoding was added in 10.12
return true;
break;
case "MLDictionaryFeatureProvider":
case "MLMultiArray":
case "MLFeatureValue":
case "MLSequence":
// Fail on Catalina, pass in older OS
if (Mac.CheckSystemVersion (10, 14))
break;
if (Mac.CheckSystemVersion (10, 15))
return true;
break;
}
break;
case "accessibilityNotifiesWhenDestroyed":