2017-11-28 23:29:05 +03:00
|
|
|
//
|
2016-05-05 03:14:32 +03:00
|
|
|
// Test the generated API selectors against typos or non-existing cases
|
|
|
|
//
|
|
|
|
// Authors:
|
|
|
|
// Paola Villarreal <paola.villarreal@xamarin.com>
|
|
|
|
//
|
|
|
|
// Copyright 2015 Xamarin Inc.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
2018-11-22 21:24:55 +03:00
|
|
|
using System.IO;
|
2016-05-05 03:14:32 +03:00
|
|
|
using System.Linq;
|
|
|
|
using System.Reflection;
|
2021-11-22 22:54:07 +03:00
|
|
|
using System.Runtime.Versioning;
|
2016-05-05 03:14:32 +03:00
|
|
|
using System.Text;
|
2017-06-27 01:17:06 +03:00
|
|
|
using System.Text.RegularExpressions;
|
2016-05-05 03:14:32 +03:00
|
|
|
using NUnit.Framework;
|
2017-06-27 01:17:06 +03:00
|
|
|
using ObjCRuntime;
|
2016-06-08 20:45:31 +03:00
|
|
|
#if MONOMAC
|
|
|
|
using AppKit;
|
|
|
|
#else
|
2016-05-05 03:14:32 +03:00
|
|
|
using UIKit;
|
2016-06-08 20:45:31 +03:00
|
|
|
#endif
|
2016-05-05 03:14:32 +03:00
|
|
|
using Foundation;
|
2021-11-22 22:54:07 +03:00
|
|
|
using Xamarin.Tests;
|
2021-11-15 10:06:36 +03:00
|
|
|
using Xamarin.Utils;
|
2016-05-05 03:14:32 +03:00
|
|
|
|
2022-11-07 17:20:26 +03:00
|
|
|
namespace Introspection {
|
|
|
|
public abstract class ApiTypoTest : ApiBaseTest {
|
2016-05-05 03:14:32 +03:00
|
|
|
protected ApiTypoTest ()
|
|
|
|
{
|
|
|
|
ContinueOnFailure = true;
|
|
|
|
}
|
|
|
|
|
2022-11-07 17:20:26 +03:00
|
|
|
public virtual bool Skip (Type baseType, string typo)
|
|
|
|
{
|
2016-05-05 03:14:32 +03:00
|
|
|
return SkipAllowed (baseType.Name, null, typo);
|
|
|
|
}
|
|
|
|
|
2022-11-07 17:20:26 +03:00
|
|
|
public virtual bool Skip (MemberInfo methodName, string typo)
|
|
|
|
{
|
2016-05-05 03:14:32 +03:00
|
|
|
return SkipAllowed (methodName.DeclaringType.Name, methodName.Name, typo);
|
|
|
|
}
|
|
|
|
|
2018-08-01 04:20:16 +03:00
|
|
|
readonly HashSet<string> allowedRule3 = new HashSet<string> {
|
|
|
|
"IARAnchorCopying", // We're showing a code snippet in the 'Advice' message and that shouldn't end with a dot.
|
|
|
|
};
|
|
|
|
|
2017-06-27 01:17:06 +03:00
|
|
|
HashSet<string> allowedMemberRule4 = new HashSet<string> {
|
|
|
|
"Platform",
|
|
|
|
"PlatformHelper",
|
|
|
|
"AvailabilityAttribute",
|
|
|
|
"iOSAttribute",
|
|
|
|
"MacAttribute",
|
|
|
|
};
|
|
|
|
|
2016-05-05 03:14:32 +03:00
|
|
|
HashSet<string> allowed = new HashSet<string> () {
|
|
|
|
"Aac",
|
|
|
|
"Accurracy",
|
|
|
|
"Achivements",
|
|
|
|
"Acos",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Acosh",
|
2017-10-03 20:59:13 +03:00
|
|
|
"Acn",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Actionname",
|
|
|
|
"Activitiy",
|
2017-02-13 16:55:44 +03:00
|
|
|
"Addin",
|
2018-02-06 20:51:06 +03:00
|
|
|
"Addl",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Addr",
|
|
|
|
"Adjustmentfor",
|
2019-09-07 03:57:40 +03:00
|
|
|
"Aes", // Advanced Encryption Standard
|
2016-05-05 03:14:32 +03:00
|
|
|
"Aifc",
|
|
|
|
"Aiff",
|
2019-09-07 03:57:40 +03:00
|
|
|
"Agc",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Aio",
|
2017-02-13 16:55:44 +03:00
|
|
|
"Alg", // short for Algorithm
|
2017-11-26 17:53:04 +03:00
|
|
|
"Alpn", // Application-Layer Protocol Negotiation RFC7301
|
2016-05-05 03:14:32 +03:00
|
|
|
"Amete",
|
|
|
|
"Amr",
|
|
|
|
"Anglet",
|
2019-09-07 03:57:40 +03:00
|
|
|
"Apng", // Animated Portable Network Graphics
|
2018-11-07 17:52:39 +03:00
|
|
|
"Aps",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Arraycollation",
|
2017-01-26 20:45:32 +03:00
|
|
|
"Argb",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Asin",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Asinh",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Atan",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Atanh",
|
2019-09-09 20:39:23 +03:00
|
|
|
"Atmos", // Dolby Atmos
|
2016-08-23 18:36:39 +03:00
|
|
|
"Ats", // App Transport Security
|
2016-05-05 03:14:32 +03:00
|
|
|
"Attrib",
|
|
|
|
"Attributevalue",
|
2018-02-15 07:34:52 +03:00
|
|
|
"Attrs", // Attributes (used by Apple for keys)
|
2016-05-05 03:14:32 +03:00
|
|
|
"Audiofile",
|
2016-08-03 20:12:07 +03:00
|
|
|
"Automapping",
|
2019-09-07 03:57:40 +03:00
|
|
|
"Automatch",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Automounted",
|
|
|
|
"Autoredirect",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Autospace",
|
2018-02-15 18:08:39 +03:00
|
|
|
"Autostarts",
|
2017-09-05 15:46:00 +03:00
|
|
|
"Avci", // file type
|
2018-02-16 14:49:05 +03:00
|
|
|
"Avb", // acronym: Audio Video Bridging
|
2016-08-29 15:21:06 +03:00
|
|
|
"Aliasable",
|
2017-08-15 15:29:33 +03:00
|
|
|
"Arcball",
|
2019-09-17 09:40:34 +03:00
|
|
|
"Atm",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Avg",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Backface",
|
2017-08-12 20:09:46 +03:00
|
|
|
"Bancaire", // french
|
|
|
|
"Bancaires", // french
|
2016-05-05 03:14:32 +03:00
|
|
|
"Bary",
|
|
|
|
"Batc",
|
2017-09-05 15:45:03 +03:00
|
|
|
"Bgra", // acrnym for Blue, Green, Red, Alpha
|
2016-05-05 03:14:32 +03:00
|
|
|
"Bim",
|
|
|
|
"Biquad",
|
|
|
|
"Bitangent",
|
|
|
|
"Blinn",
|
|
|
|
"Blit",
|
|
|
|
"Bokeh",
|
2016-06-28 23:25:24 +03:00
|
|
|
"Bggr", // acronym for Blue, Green, Green, Red
|
2016-05-05 03:14:32 +03:00
|
|
|
"Bsln",
|
|
|
|
"Bssid",
|
2018-02-16 14:49:05 +03:00
|
|
|
"Btle", // Bluetooth Low Energy
|
2016-05-05 03:14:32 +03:00
|
|
|
"Bzip",
|
|
|
|
"Cabac",
|
|
|
|
"Caf", // acronym: Core Audio Format
|
|
|
|
"Cancellable",
|
2017-11-08 22:42:38 +03:00
|
|
|
"Cartes", // french
|
2016-05-05 03:14:32 +03:00
|
|
|
"Cavlc",
|
2016-08-09 17:23:12 +03:00
|
|
|
"Cda", // acronym: Clinical Document Architecture
|
Fix a few introspection issues on Catalina. (#7212) (#7243)
* [SceneKit] Adjust deprecation message.
Fixes this introspection failure:
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Type: SCNLayer
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_OpenGLContext, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_OpenGLContext, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_PixelFormat, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_PixelFormat, Type: SCNView
* [AppKit] Adjust deprecation messages.
* [tests] Fix introspection and xammac tests on Catalina. (#7200)
* [tests] Adjust NaturalLanguage.EmbeddingTest to cope with non-existent embeddings. Fixes xamarin/maccore#2011.
Fixes https://github.com/xamarin/maccore/issues/2011.
* [tests] Fix typo test on macOS 10.15. Fixes #7116.
Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
* [introspection] Ignore MTLCounterSampleBufferDescriptor's selectors.
They're implemented using a different/internal type:
$ nm /System/Library/Frameworks/Metal.framework/Metal | grep MTLCounterSampleBuffer
00000000000458ab t +[MTLCounterSampleBufferDescriptor allocWithZone:]
0000000000045897 t +[MTLCounterSampleBufferDescriptor alloc]
000000000004591e t -[MTLCounterSampleBufferDescriptor copyWithZone:]
000000000004598e t -[MTLCounterSampleBufferDescriptorInternal copyWithZone:]
0000000000045c0f t -[MTLCounterSampleBufferDescriptorInternal counterSet]
0000000000045936 t -[MTLCounterSampleBufferDescriptorInternal dealloc]
0000000000045b65 t -[MTLCounterSampleBufferDescriptorInternal hash]
0000000000045a31 t -[MTLCounterSampleBufferDescriptorInternal isEqual:]
0000000000045c58 t -[MTLCounterSampleBufferDescriptorInternal label]
0000000000045c7f t -[MTLCounterSampleBufferDescriptorInternal sampleCount]
0000000000045c25 t -[MTLCounterSampleBufferDescriptorInternal setCounterSet:]
0000000000045c6e t -[MTLCounterSampleBufferDescriptorInternal setLabel:]
0000000000045c90 t -[MTLCounterSampleBufferDescriptorInternal setSampleCount:]
0000000000045c47 t -[MTLCounterSampleBufferDescriptorInternal setStorageMode:]
0000000000045c36 t -[MTLCounterSampleBufferDescriptorInternal storageMode]
000000000010b0b8 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptor
000000000010b0e0 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptorInternal
0000000000107070 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._counterSet
0000000000107078 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._label
0000000000107088 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._sampleCount
0000000000107080 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._storageMode
000000000010b108 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptor
000000000010b130 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptorInternal
Fixes these test failures:
1) ApiSelectorTest.InstanceMethods (Introspection.MacApiSelectorTest.ApiSelectorTest.InstanceMethods)
8 errors found in 26658 instance selector validated:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : counterSet
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setCounterSet:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : label
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setLabel:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : sampleCount
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setSampleCount:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : storageMode
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setStorageMode:
* [introspection] Ignore some API we've bound incorrectly. Fixes #7116.
There are also a few API fixes, those will be submitted in a different PR.
Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
2019-10-22 23:30:19 +03:00
|
|
|
"Cdrom",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Celu", // Continuously Differentiable Exponential Linear Unit (ML)
|
2021-07-01 03:18:41 +03:00
|
|
|
"Chip", // framework name
|
2018-08-08 04:06:40 +03:00
|
|
|
"Cfa", // acronym: Color Filter Array
|
2016-05-05 03:14:32 +03:00
|
|
|
"Celp", // MPEG4ObjectID
|
|
|
|
"Characterteristic",
|
2017-10-13 09:08:17 +03:00
|
|
|
"Chapv",
|
2017-11-28 23:29:05 +03:00
|
|
|
"Cholesky",
|
2019-09-07 03:57:40 +03:00
|
|
|
"Chacha",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Chromaticities",
|
2018-11-07 17:52:39 +03:00
|
|
|
"Ciexyz",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Ciff",
|
|
|
|
"Cinepak",
|
|
|
|
"Clearcoat",
|
2016-08-16 19:00:49 +03:00
|
|
|
"Cnn", // Convolutional Neural Network
|
2017-11-23 04:52:10 +03:00
|
|
|
"Cns",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Colos",
|
|
|
|
"Commerical",
|
|
|
|
"Composable",
|
|
|
|
"Conflictserror",
|
|
|
|
"Connnect",
|
|
|
|
"Counterclock",
|
2017-09-05 15:57:58 +03:00
|
|
|
"Copyback",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Craete",
|
2016-12-13 05:26:23 +03:00
|
|
|
"Crosstraining",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Cubemap",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Cmaf", // Common Media Application Format (mpeg4)
|
2018-11-07 17:52:39 +03:00
|
|
|
"Cmy", // acronym: Cyan, magenta, yellow
|
2016-05-05 03:14:32 +03:00
|
|
|
"Cmyk", // acronym: Cyan, magenta, yellow and key
|
|
|
|
"Daap",
|
|
|
|
"Dav",
|
|
|
|
"Dcip", // acronym: Digital Cinema Implementation Partners
|
|
|
|
"Deca",
|
|
|
|
"Decomposables",
|
|
|
|
"Deinterlace",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Depthwise",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Descendents",
|
|
|
|
"Descrete",
|
2016-08-16 19:00:49 +03:00
|
|
|
"Dhe", // Diffie–Hellman key exchange
|
2019-11-06 22:52:13 +03:00
|
|
|
"Diffable", // that you can diff it.. made up word from apple
|
2016-05-05 03:14:32 +03:00
|
|
|
"Differental",
|
|
|
|
"Diffie",
|
|
|
|
"Directionfor",
|
|
|
|
"Dist",
|
|
|
|
"dlclose",
|
|
|
|
"dlerror",
|
|
|
|
"Dlfcn",
|
|
|
|
"dlopen",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Dls",
|
2016-10-28 17:50:42 +03:00
|
|
|
"Dlsym",
|
2016-05-05 03:14:32 +03:00
|
|
|
"dlsym",
|
|
|
|
"Dng",
|
|
|
|
"Dns",
|
|
|
|
"Dont",
|
|
|
|
"Dop",
|
2018-02-06 20:51:06 +03:00
|
|
|
"Dopesheet",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Downsample",
|
|
|
|
"Downmix", // Sound terminology that means making a stereo mix from a 5.1 surround mix.
|
|
|
|
"Dpa",
|
|
|
|
"Dpad", // Directional pad (D-pad)
|
2020-09-15 20:09:18 +03:00
|
|
|
"Dpads", // plural of above
|
2016-05-05 03:14:32 +03:00
|
|
|
"Droste",
|
|
|
|
"Dtls",
|
2016-06-18 16:20:38 +03:00
|
|
|
"Dtmf", // DTMF
|
2016-05-05 03:14:32 +03:00
|
|
|
"dy",
|
2017-10-13 09:08:17 +03:00
|
|
|
"Eap",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Ebu",
|
2016-08-23 18:36:39 +03:00
|
|
|
"Ecc", // Elliptic Curve Cryptography
|
|
|
|
"Ecdh", // Elliptic Curve Diffie–Hellman
|
2019-09-07 03:57:40 +03:00
|
|
|
"Ecdhe", // Elliptic Curve Diffie-Hellman Ephemeral
|
2016-08-16 19:00:49 +03:00
|
|
|
"Ecdsa", // Elliptic Curve Digital Signature Algorithm
|
2016-08-23 18:36:39 +03:00
|
|
|
"Ecies", // Elliptic Curve Integrated Encryption Scheme
|
2018-07-20 23:44:11 +03:00
|
|
|
"Ecn", // Explicit Congestion Notification
|
|
|
|
"Ect", // ECN Capable Transport
|
2019-06-25 19:26:03 +03:00
|
|
|
"Editability",
|
|
|
|
"Edr",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Eof", // acronym End-Of-File
|
2017-11-28 23:29:05 +03:00
|
|
|
"Elu",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Emagic",
|
|
|
|
"Emaili",
|
2018-02-06 20:51:06 +03:00
|
|
|
"Embd",
|
2019-01-31 00:51:26 +03:00
|
|
|
"Emsg", // 4cc
|
2018-02-06 20:51:06 +03:00
|
|
|
"Enc",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Eppc",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Epub",
|
2018-08-01 04:22:30 +03:00
|
|
|
"Eftpos", // Electronic funds transfer at point of sale
|
2019-06-25 19:26:03 +03:00
|
|
|
"Eotf", // DisplayP3_PQ_Eotf
|
2019-07-19 20:49:58 +03:00
|
|
|
"Exabits",
|
|
|
|
"Exbibits",
|
|
|
|
"Exbibytes",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Exhange",
|
|
|
|
"Exp",
|
2018-02-06 20:51:06 +03:00
|
|
|
"Expr",
|
|
|
|
"Exr",
|
2016-10-04 20:36:32 +03:00
|
|
|
"Felica", // Japanese contactless RFID smart card system
|
2016-08-02 15:03:35 +03:00
|
|
|
"Femtowatts",
|
2018-06-29 22:41:16 +03:00
|
|
|
"Fhir",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Flipside",
|
|
|
|
"Formati",
|
|
|
|
"Fov",
|
|
|
|
"Framebuffer",
|
|
|
|
"Framesetter",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Froms", // NSMetadataItemWhereFromsKey
|
2016-05-05 03:14:32 +03:00
|
|
|
"Freq",
|
|
|
|
"Ftps",
|
|
|
|
"Func",
|
|
|
|
"Gadu",
|
2016-06-28 23:25:24 +03:00
|
|
|
"Gbrg", // acronym for Green-Blue-Reg-Green
|
2020-09-15 20:09:18 +03:00
|
|
|
"Gelu", // Gaussian Error Linear Unit (ML)
|
2016-05-05 03:14:32 +03:00
|
|
|
"Geocoder",
|
2016-08-02 15:03:35 +03:00
|
|
|
"Gigapascals",
|
2019-07-19 20:49:58 +03:00
|
|
|
"Gibibits",
|
|
|
|
"Gibibytes",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Girocard",
|
|
|
|
"Glorot", // NN
|
2018-06-15 03:00:30 +03:00
|
|
|
"Gop", // acronym for Group Of Pictures
|
2016-05-05 03:14:32 +03:00
|
|
|
"Gpp",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Gps",
|
2017-02-09 16:37:18 +03:00
|
|
|
"Gpu", // acronym for Graphics Processing Unit
|
2016-06-28 23:25:24 +03:00
|
|
|
"Grbg", // acronym for Green-Red-Blue-Green
|
2019-02-27 14:36:08 +03:00
|
|
|
"Gru",
|
2017-08-04 16:06:21 +03:00
|
|
|
"Greeking",
|
2018-02-06 20:51:06 +03:00
|
|
|
"Gtin",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Gui",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Hardlink",
|
2019-09-07 03:57:40 +03:00
|
|
|
"Heics", // High Efficiency Image File Format (Sequence)
|
2016-05-05 03:14:32 +03:00
|
|
|
"Hdmi",
|
|
|
|
"Hdr",
|
2016-08-02 15:03:35 +03:00
|
|
|
"Hectopascals",
|
2017-09-05 15:46:00 +03:00
|
|
|
"Heic", // file type
|
|
|
|
"Heif", // file type
|
2016-05-05 03:14:32 +03:00
|
|
|
"Hevc", // CMVideoCodecType / High Efficiency Video Coding
|
2017-09-07 21:52:13 +03:00
|
|
|
"Heif", // High Efficiency Image File Format
|
2016-05-05 03:14:32 +03:00
|
|
|
"Hfp",
|
|
|
|
"Hipass",
|
2017-11-14 16:51:41 +03:00
|
|
|
"Hlg", // Hybrid Log-Gamma
|
2016-05-05 03:14:32 +03:00
|
|
|
"Hls",
|
2017-08-01 20:48:23 +03:00
|
|
|
"Hoa",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Hrtf", // acronym used in AUSpatializationAlgorithm
|
|
|
|
"Hvxc", // MPEG4ObjectID
|
2020-09-15 20:09:18 +03:00
|
|
|
"Icns",
|
|
|
|
"Ico",
|
2016-08-05 15:23:02 +03:00
|
|
|
"Ies",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Icq",
|
2018-06-11 23:21:56 +03:00
|
|
|
"Ident",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Identd",
|
2017-09-15 04:42:40 +03:00
|
|
|
"Imageblock",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Imagefor",
|
|
|
|
"Imap",
|
|
|
|
"Imaps",
|
|
|
|
"Img",
|
2018-01-26 20:38:23 +03:00
|
|
|
"Impl", // BindingImplAttribute
|
2018-02-06 20:51:06 +03:00
|
|
|
"Inv",
|
2016-12-13 05:26:23 +03:00
|
|
|
"Indoorrun",
|
|
|
|
"Indoorcycle",
|
2017-08-04 16:06:21 +03:00
|
|
|
"Inklist",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Indeterm",
|
2016-12-13 05:26:23 +03:00
|
|
|
"Indoorwalk",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Inode",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Inser",
|
2018-11-07 17:52:39 +03:00
|
|
|
"Instamatic",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Interac",
|
|
|
|
"Interframe",
|
|
|
|
"Interitem",
|
|
|
|
"Intermenstrual",
|
2019-01-26 01:24:13 +03:00
|
|
|
"Intersector",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Intoi",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Invitable",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Ios",
|
2019-02-27 14:36:08 +03:00
|
|
|
"Iou",
|
2016-08-23 15:19:54 +03:00
|
|
|
"Ipa",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Ipp",
|
|
|
|
"Iptc",
|
|
|
|
"Ircs",
|
2018-11-07 17:52:39 +03:00
|
|
|
"Iso",
|
2017-07-18 19:12:10 +03:00
|
|
|
"Itf",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Itu",
|
2019-06-25 19:26:03 +03:00
|
|
|
"Itur", // Itur_2020_Hlg
|
2016-10-04 20:36:32 +03:00
|
|
|
"Jcb", // Japanese credit card company
|
2016-05-05 03:14:32 +03:00
|
|
|
"Jfif",
|
2018-11-07 17:52:39 +03:00
|
|
|
"Jis",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Json",
|
|
|
|
"Keyerror",
|
|
|
|
"Keyi",
|
2017-11-28 23:29:05 +03:00
|
|
|
"Keypoint",
|
|
|
|
"Keypoints",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Keyspace",
|
|
|
|
"ks",
|
2019-07-19 20:49:58 +03:00
|
|
|
"Kibibits",
|
|
|
|
"Kibibytes",
|
2016-08-02 15:03:35 +03:00
|
|
|
"Kiloampere",
|
|
|
|
"Kiloamperes",
|
|
|
|
"Kiloohms",
|
|
|
|
"Kilopascals",
|
2019-02-27 14:36:08 +03:00
|
|
|
"Kullback", // Kullback-Leibler Divergence
|
2016-05-05 03:14:32 +03:00
|
|
|
"Langauges",
|
2016-08-30 22:32:46 +03:00
|
|
|
"Lacunarity",
|
2019-07-08 18:19:15 +03:00
|
|
|
"Latm", // Low Overhead Audio Transport Multiplex
|
2016-05-05 03:14:32 +03:00
|
|
|
"Ldaps",
|
|
|
|
"Lerp",
|
|
|
|
"Linecap",
|
|
|
|
"Lingustic",
|
2018-05-11 22:54:31 +03:00
|
|
|
"libcompression",
|
2018-10-09 16:51:17 +03:00
|
|
|
"libdispatch",
|
2019-07-08 18:19:15 +03:00
|
|
|
"Loas", // Low Overhead Audio Stream
|
2016-05-05 03:14:32 +03:00
|
|
|
"Lod",
|
|
|
|
"Lopass",
|
|
|
|
"Lowlevel",
|
2019-02-27 14:36:08 +03:00
|
|
|
"Lstm",
|
2017-11-28 23:29:05 +03:00
|
|
|
"Lun",
|
2017-11-29 02:27:20 +03:00
|
|
|
"Luma",
|
2018-05-11 22:54:31 +03:00
|
|
|
"Lzfse", // acronym
|
|
|
|
"Lzma", // acronym
|
2019-01-29 00:08:18 +03:00
|
|
|
"Mada", // payment system
|
2017-10-23 22:22:17 +03:00
|
|
|
"Mapbuffer",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Matchingcoalesce",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Mcp", // metacarpophalangeal (hand)
|
2019-07-19 20:49:58 +03:00
|
|
|
"Mebibits",
|
|
|
|
"Mebibytes",
|
2016-08-02 15:03:35 +03:00
|
|
|
"Megaampere",
|
|
|
|
"Megaamperes",
|
|
|
|
"Megaliters",
|
|
|
|
"Megameters",
|
|
|
|
"Megaohms",
|
|
|
|
"Megapascals",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Metacharacters",
|
2016-08-05 15:23:02 +03:00
|
|
|
"Metalness",
|
2016-08-09 15:11:44 +03:00
|
|
|
"Metadatas",
|
2016-08-02 15:03:35 +03:00
|
|
|
"Microampere",
|
|
|
|
"Microamperes",
|
|
|
|
"Microohms",
|
|
|
|
"Microwatts",
|
|
|
|
"Millimoles",
|
|
|
|
"Milliohms",
|
2016-07-06 18:19:21 +03:00
|
|
|
"Mimap",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Minification",
|
2017-10-13 09:08:17 +03:00
|
|
|
"Mncs",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Mgmt",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Mobike", // acronym
|
|
|
|
"Morpher",
|
2020-01-31 23:02:52 +03:00
|
|
|
"mtouch",
|
2016-08-24 03:29:43 +03:00
|
|
|
"Mpe", // acronym
|
2017-11-28 23:29:05 +03:00
|
|
|
"Mps",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Msaa", // multisample anti-aliasing
|
2016-05-05 03:14:32 +03:00
|
|
|
"Mtu", // acronym
|
|
|
|
"Mtc", // acronym
|
2020-06-13 04:59:00 +03:00
|
|
|
"Mtgp",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Mul",
|
|
|
|
"Mult",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Multihead",
|
2017-08-15 15:32:51 +03:00
|
|
|
"Multipath",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Multipeer",
|
|
|
|
"Muxed",
|
2017-10-13 09:08:17 +03:00
|
|
|
"Nai",
|
2016-08-02 15:03:35 +03:00
|
|
|
"Nanograms",
|
|
|
|
"Nanowatts",
|
2019-02-27 14:36:08 +03:00
|
|
|
"Nestrov",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Nesterov",
|
2016-05-05 03:14:32 +03:00
|
|
|
"nfloat",
|
2017-10-17 19:35:38 +03:00
|
|
|
"Nfnt",
|
2016-05-05 03:14:32 +03:00
|
|
|
"nint",
|
|
|
|
"Nntps",
|
|
|
|
"Ntlm",
|
Fix a few introspection issues on Catalina. (#7212) (#7243)
* [SceneKit] Adjust deprecation message.
Fixes this introspection failure:
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Type: SCNLayer
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_OpenGLContext, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_OpenGLContext, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_PixelFormat, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_PixelFormat, Type: SCNView
* [AppKit] Adjust deprecation messages.
* [tests] Fix introspection and xammac tests on Catalina. (#7200)
* [tests] Adjust NaturalLanguage.EmbeddingTest to cope with non-existent embeddings. Fixes xamarin/maccore#2011.
Fixes https://github.com/xamarin/maccore/issues/2011.
* [tests] Fix typo test on macOS 10.15. Fixes #7116.
Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
* [introspection] Ignore MTLCounterSampleBufferDescriptor's selectors.
They're implemented using a different/internal type:
$ nm /System/Library/Frameworks/Metal.framework/Metal | grep MTLCounterSampleBuffer
00000000000458ab t +[MTLCounterSampleBufferDescriptor allocWithZone:]
0000000000045897 t +[MTLCounterSampleBufferDescriptor alloc]
000000000004591e t -[MTLCounterSampleBufferDescriptor copyWithZone:]
000000000004598e t -[MTLCounterSampleBufferDescriptorInternal copyWithZone:]
0000000000045c0f t -[MTLCounterSampleBufferDescriptorInternal counterSet]
0000000000045936 t -[MTLCounterSampleBufferDescriptorInternal dealloc]
0000000000045b65 t -[MTLCounterSampleBufferDescriptorInternal hash]
0000000000045a31 t -[MTLCounterSampleBufferDescriptorInternal isEqual:]
0000000000045c58 t -[MTLCounterSampleBufferDescriptorInternal label]
0000000000045c7f t -[MTLCounterSampleBufferDescriptorInternal sampleCount]
0000000000045c25 t -[MTLCounterSampleBufferDescriptorInternal setCounterSet:]
0000000000045c6e t -[MTLCounterSampleBufferDescriptorInternal setLabel:]
0000000000045c90 t -[MTLCounterSampleBufferDescriptorInternal setSampleCount:]
0000000000045c47 t -[MTLCounterSampleBufferDescriptorInternal setStorageMode:]
0000000000045c36 t -[MTLCounterSampleBufferDescriptorInternal storageMode]
000000000010b0b8 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptor
000000000010b0e0 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptorInternal
0000000000107070 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._counterSet
0000000000107078 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._label
0000000000107088 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._sampleCount
0000000000107080 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._storageMode
000000000010b108 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptor
000000000010b130 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptorInternal
Fixes these test failures:
1) ApiSelectorTest.InstanceMethods (Introspection.MacApiSelectorTest.ApiSelectorTest.InstanceMethods)
8 errors found in 26658 instance selector validated:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : counterSet
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setCounterSet:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : label
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setLabel:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : sampleCount
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setSampleCount:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : storageMode
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setStorageMode:
* [introspection] Ignore some API we've bound incorrectly. Fixes #7116.
There are also a few API fixes, those will be submitted in a different PR.
Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
2019-10-22 23:30:19 +03:00
|
|
|
"Nsl", // InternetLocationNslNeighborhoodIcon
|
2016-05-05 03:14:32 +03:00
|
|
|
"Ntsc",
|
|
|
|
"nuint",
|
2017-06-19 21:56:00 +03:00
|
|
|
"Ndef",
|
2017-12-22 22:03:21 +03:00
|
|
|
"Noi", // From NoiOSAttribute
|
2017-11-23 04:52:10 +03:00
|
|
|
"Nop",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Numbernumber",
|
|
|
|
"Nyquist",
|
2017-06-22 20:43:43 +03:00
|
|
|
"Oaep", // Optimal asymmetric encryption padding
|
2016-05-05 03:14:32 +03:00
|
|
|
"Objectfor",
|
2019-09-07 03:57:40 +03:00
|
|
|
"Objectness",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Occlussion",
|
|
|
|
"Ocurrences",
|
2017-11-26 17:53:04 +03:00
|
|
|
"Ocsp", // Online Certificate Status Protocol
|
2016-08-30 22:32:46 +03:00
|
|
|
"Octree",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Oid",
|
|
|
|
"Oneup", // TVElementKeyOneupTemplate
|
2018-02-06 20:51:06 +03:00
|
|
|
"Organisation", // kCGImagePropertyIPTCExtRegistryOrganisationID in Xcode9.3-b1
|
2016-05-05 03:14:32 +03:00
|
|
|
"Orthographyrange",
|
2017-10-05 21:32:25 +03:00
|
|
|
"Orth",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Osa", // Open Scripting Architecture
|
|
|
|
"Otsu", // threshold for image binarization
|
2016-05-05 03:14:32 +03:00
|
|
|
"ove",
|
|
|
|
"Paeth", // PNG filter
|
2019-06-25 19:26:03 +03:00
|
|
|
"Palettize",
|
2017-02-13 16:55:44 +03:00
|
|
|
"Parms", // short for Parameters
|
2017-10-13 09:08:17 +03:00
|
|
|
"Peap",
|
2019-07-19 20:49:58 +03:00
|
|
|
"Pebibits",
|
|
|
|
"Pebibytes",
|
|
|
|
"Petabits",
|
2016-08-30 22:32:46 +03:00
|
|
|
"Perlin",
|
2017-02-23 01:54:01 +03:00
|
|
|
"Persistable",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Pausable",
|
|
|
|
"Pcl",
|
|
|
|
"Pcm",
|
|
|
|
"Pdu",
|
|
|
|
"Persistance",
|
|
|
|
"Pesented",
|
|
|
|
"Pfs", // acronym
|
2020-06-13 04:59:00 +03:00
|
|
|
"Philox",
|
2016-08-02 15:03:35 +03:00
|
|
|
"Picometers",
|
|
|
|
"Picowatts",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Pkcs",
|
|
|
|
"Placemark",
|
|
|
|
"Playthrough",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Pnc", // MIDI
|
2017-11-28 23:29:05 +03:00
|
|
|
"Pnorm",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Pointillize",
|
|
|
|
"Polyline",
|
2019-09-17 09:40:34 +03:00
|
|
|
"Polylines",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Popularimeter",
|
2017-02-13 16:55:44 +03:00
|
|
|
"Preds", // short for Predicates
|
2016-05-05 03:14:32 +03:00
|
|
|
"Prerolls",
|
|
|
|
"Preseti",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Prev",
|
Fix a few introspection issues on Catalina. (#7212) (#7243)
* [SceneKit] Adjust deprecation message.
Fixes this introspection failure:
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Type: SCNLayer
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_OpenGLContext, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_OpenGLContext, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_PixelFormat, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_PixelFormat, Type: SCNView
* [AppKit] Adjust deprecation messages.
* [tests] Fix introspection and xammac tests on Catalina. (#7200)
* [tests] Adjust NaturalLanguage.EmbeddingTest to cope with non-existent embeddings. Fixes xamarin/maccore#2011.
Fixes https://github.com/xamarin/maccore/issues/2011.
* [tests] Fix typo test on macOS 10.15. Fixes #7116.
Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
* [introspection] Ignore MTLCounterSampleBufferDescriptor's selectors.
They're implemented using a different/internal type:
$ nm /System/Library/Frameworks/Metal.framework/Metal | grep MTLCounterSampleBuffer
00000000000458ab t +[MTLCounterSampleBufferDescriptor allocWithZone:]
0000000000045897 t +[MTLCounterSampleBufferDescriptor alloc]
000000000004591e t -[MTLCounterSampleBufferDescriptor copyWithZone:]
000000000004598e t -[MTLCounterSampleBufferDescriptorInternal copyWithZone:]
0000000000045c0f t -[MTLCounterSampleBufferDescriptorInternal counterSet]
0000000000045936 t -[MTLCounterSampleBufferDescriptorInternal dealloc]
0000000000045b65 t -[MTLCounterSampleBufferDescriptorInternal hash]
0000000000045a31 t -[MTLCounterSampleBufferDescriptorInternal isEqual:]
0000000000045c58 t -[MTLCounterSampleBufferDescriptorInternal label]
0000000000045c7f t -[MTLCounterSampleBufferDescriptorInternal sampleCount]
0000000000045c25 t -[MTLCounterSampleBufferDescriptorInternal setCounterSet:]
0000000000045c6e t -[MTLCounterSampleBufferDescriptorInternal setLabel:]
0000000000045c90 t -[MTLCounterSampleBufferDescriptorInternal setSampleCount:]
0000000000045c47 t -[MTLCounterSampleBufferDescriptorInternal setStorageMode:]
0000000000045c36 t -[MTLCounterSampleBufferDescriptorInternal storageMode]
000000000010b0b8 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptor
000000000010b0e0 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptorInternal
0000000000107070 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._counterSet
0000000000107078 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._label
0000000000107088 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._sampleCount
0000000000107080 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._storageMode
000000000010b108 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptor
000000000010b130 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptorInternal
Fixes these test failures:
1) ApiSelectorTest.InstanceMethods (Introspection.MacApiSelectorTest.ApiSelectorTest.InstanceMethods)
8 errors found in 26658 instance selector validated:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : counterSet
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setCounterSet:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : label
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setLabel:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : sampleCount
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setSampleCount:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : storageMode
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setStorageMode:
* [introspection] Ignore some API we've bound incorrectly. Fixes #7116.
There are also a few API fixes, those will be submitted in a different PR.
Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
2019-10-22 23:30:19 +03:00
|
|
|
"Privs", // SharingPrivsNotApplicableIcon
|
2016-05-05 03:14:32 +03:00
|
|
|
"Propogate",
|
|
|
|
"Psec",
|
2017-08-25 00:41:10 +03:00
|
|
|
"Psm", // Protocol/Service Multiplexer
|
2018-01-28 01:26:43 +03:00
|
|
|
"Psk",
|
2018-11-07 17:52:39 +03:00
|
|
|
"Ptp",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Pvrtc", // MTLBlitOption - PowerVR Texture Compression
|
2019-01-17 20:40:58 +03:00
|
|
|
"Qos",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Quaterniond",
|
2017-08-04 16:06:21 +03:00
|
|
|
"Quadding",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Qura",
|
2017-01-26 21:45:07 +03:00
|
|
|
"Quic",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Reacquirer",
|
|
|
|
"Reinvitation",
|
|
|
|
"Reinvite",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Rel",
|
2018-01-31 01:09:16 +03:00
|
|
|
"Relocalization",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Relu", // Rectified Linear Unit (ML)
|
|
|
|
"Relun", // ReLUn - degree n Hermite coefficients
|
2017-10-05 08:48:53 +03:00
|
|
|
"Reprandial",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Replayable",
|
|
|
|
"Requestwith",
|
2016-07-13 00:21:35 +03:00
|
|
|
"Ridesharing",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Rgb",
|
|
|
|
"Rgba",
|
2016-06-28 23:25:24 +03:00
|
|
|
"Rggb", // acronym for Red, Green, Green, Blue
|
2017-11-28 23:29:05 +03:00
|
|
|
"Rnn",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Roi",
|
|
|
|
"Romm", // acronym: Reference Output Medium Metric
|
|
|
|
"Rpa",
|
|
|
|
"Rpn", // acronym
|
2016-07-26 22:57:26 +03:00
|
|
|
"Rsa", // Rivest, Shamir and Adleman
|
2020-09-15 20:09:18 +03:00
|
|
|
"Rsqrt", // reciprocal square root
|
2016-05-05 03:14:32 +03:00
|
|
|
"Rssi",
|
2016-06-30 15:31:40 +03:00
|
|
|
"Rtp",
|
2017-08-04 16:06:21 +03:00
|
|
|
"Rtl",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Rtsp",
|
2016-06-15 23:51:21 +03:00
|
|
|
"Saml", // acronym
|
2018-07-04 12:14:17 +03:00
|
|
|
"Sdof",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Scn",
|
|
|
|
"Sdk",
|
|
|
|
"Sdtv", // acronym: Standard Definition Tele Vision
|
2017-10-05 08:48:53 +03:00
|
|
|
"Sdnn",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Seekable",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Selu", // Scaled Exponential Linear unit (ML)
|
|
|
|
"Sgd", // Stochastic Gradient Descent (ML)
|
2016-05-05 03:14:32 +03:00
|
|
|
"Shadable",
|
|
|
|
"Sharegroup",
|
2020-04-06 21:31:46 +03:00
|
|
|
"Sha", // Secure Hash Algorithm
|
2016-05-05 03:14:32 +03:00
|
|
|
"Siemen",
|
2017-10-23 22:22:17 +03:00
|
|
|
"simd",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Sinh",
|
|
|
|
"Sint", // as in "Signed Integer"
|
2017-10-27 17:47:19 +03:00
|
|
|
"Simd",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Slerp",
|
|
|
|
"Slomo",
|
|
|
|
"Smpte",
|
|
|
|
"Snapshotter",
|
|
|
|
"Snorm",
|
|
|
|
"Sobel",
|
2019-10-16 16:16:32 +03:00
|
|
|
"Softmax", // get_SoftmaxNormalization
|
2016-05-05 03:14:32 +03:00
|
|
|
"Spacei",
|
|
|
|
"Sqrt",
|
|
|
|
"Srgb",
|
|
|
|
"Ssid",
|
2017-10-13 09:08:17 +03:00
|
|
|
"Ssids",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Standarize",
|
|
|
|
"Stateful",
|
|
|
|
"Stateright",
|
|
|
|
"Subbeat",
|
2016-06-21 15:56:38 +03:00
|
|
|
"Subcaption",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Subcardioid",
|
|
|
|
"Subentities",
|
|
|
|
"Subheadline",
|
2016-06-18 17:34:03 +03:00
|
|
|
"Sublocality",
|
2018-02-06 20:51:06 +03:00
|
|
|
"Sublocation",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Submesh",
|
|
|
|
"Submeshes",
|
|
|
|
"Subpixel",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Subresource",
|
|
|
|
"Subresources",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Subsec",
|
2016-10-04 20:36:32 +03:00
|
|
|
"Suica", // Japanese contactless smart card type
|
2016-05-05 03:14:32 +03:00
|
|
|
"Superentity",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Supertype",
|
|
|
|
"Supertypes",
|
|
|
|
"Svg", // Scalable Vector Graphics
|
2016-05-05 03:14:32 +03:00
|
|
|
"Sym",
|
|
|
|
"Synchronizable",
|
2017-07-18 19:12:10 +03:00
|
|
|
"Symbologies",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Tanh",
|
2019-07-19 20:49:58 +03:00
|
|
|
"Tebibits",
|
|
|
|
"Tebibytes",
|
2017-11-28 23:29:05 +03:00
|
|
|
"Tensorflow",
|
2017-09-07 20:51:09 +03:00
|
|
|
"Tessellator",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Texcoord",
|
|
|
|
"Texel",
|
|
|
|
"th",
|
|
|
|
"Threadgroup",
|
|
|
|
"Threadgroups",
|
2019-09-07 03:57:40 +03:00
|
|
|
"Thumbnailing",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Thumbstick",
|
2019-09-07 03:57:40 +03:00
|
|
|
"Thumbsticks",
|
|
|
|
"Timecodes",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Timelapse",
|
|
|
|
"Timelapses",
|
|
|
|
"Tls",
|
2017-10-13 09:08:17 +03:00
|
|
|
"Ttls",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Tlv",
|
2019-06-25 19:26:03 +03:00
|
|
|
"Toc",
|
|
|
|
"Toci",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Toi",
|
2017-06-19 21:56:00 +03:00
|
|
|
"Transceive",
|
[CoreGraphics] Implement CoreGraphics bindings for Xcode 9. (#2812)
* [ios11-b1] CoreGraphics bindings
* Updated with feedback from Sebastien
* Fix build, optimize checks
* Add version information
* Address comments
* Tests
* Remove Apply code, add special code for typo
* [CoreGraphics] Add comma after last enum value.
* [CoreGraphics] No need to bind CGColorSpaceGetName.
* [CoreGraphics] Add new field in Xcode 9 beta 5.
* [CoreGraphics] Move kCGPDFContextAccessPermissions to the correct dictionary container and implement the corresponding manual code.
* [CoreGraphics] Adjust nullability acceptance based on new attributes for CGColorSpace.CreateCalibratedGray/RGB functions.
* [CoreGraphics] Bind CGColorSpaceCreateLab, introduced in Xcode 9 beta 5.
* [CoreGraphics] Adjust CGColorSpaceCreateWithICCData and CGColorSpaceCreateWithICCProfile bindings according to Xcode 9 beta 2.
Apple introduced CGColorSpaceCreateWithICCData in b1, and made
CGColorSpaceCreateWithICCProfile a typedef to CGColorSpaceCreateWithICCData.
Apple reversed the typedef in b2 (probably because it creates broken
executables when targetting earlier versions of macOS, since those executables
would use CGColorSpaceCreateWithICCData, which would not exist), and instead
made CGColorSpaceCreateWithICCProfile a normal deprecated method.
So copy this logic in our bindings: deprecate CreateICCProfile, and introduce
CreateICCProfile, with two overloads for NSData and CGDataProvider (since
that's what's accepted according to the documentation).
* [CoreGraphics] Add CGContextPDF constructors to make parity between different overloads.
There are two types of CGContextPDF constructors: the first argument is either
an NSUrl or a CGDataConsumer. Previously the NSUrl type had more overloads,
and also allowed a null CGRect for the second argument. With the overloads are
identical between the two types of CGContextPDF constructors.
Existing constructors:
CGContextPDF (NSUrl, CGRect, CGPDFInfo)
CGContextPDF (NSUrl, CGRect)
CGContextPDF (NSUrl, CGPDFInfo)
CGContextPDF (NSUrl)
CGContextPDF (CGDataConsumer, CGRect, CGPDFInfo)
Added constructors:
CGContextPDF (CGDataConsumer, CGRect)
CGContextPDF (CGDataConsumer, CGPDFInfo)
CGContextPDF (CGDataConsumer)
Additionally the code has been fixed to not throw NullReferenceExceptions if
null is passed for any of the values and instead pass on any null values to
the native `CGPDFContextCreate` method (since `CGPDFContextCreate`'s arguments
are all `__nullable`).
* [tests] Add and improve existing tests for new and some existing CoreGraphics API.
* Undo accidental whitespace noise.
* [tests] Remove random characters in assert message.
* [CoreGraphics] Improve argument exception messages in CGColorSpace according to review.
* [CoreGraphics] Use 'Icc' instead of 'ICC' for new API, and also make the change for XAMCORE_4_0.
* [CoreGraphics] Fix availability attribute for High Sierra.
* [tests] Update monotouch-test after API changes.
2017-10-02 13:02:41 +03:00
|
|
|
"Trc",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Truncantion",
|
|
|
|
"Tweening",
|
2018-11-07 17:52:39 +03:00
|
|
|
"Twips",
|
2016-05-05 03:14:32 +03:00
|
|
|
"tx",
|
|
|
|
"ty",
|
|
|
|
"Udi",
|
|
|
|
"Udp",
|
|
|
|
"Unconfigured",
|
|
|
|
"Undecodable",
|
2018-07-02 14:45:34 +03:00
|
|
|
"Unemphasized",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Underrun",
|
2016-07-13 00:21:35 +03:00
|
|
|
"Unflagged",
|
2017-08-03 10:05:41 +03:00
|
|
|
"Unfocusing",
|
2020-09-15 20:09:18 +03:00
|
|
|
"Uid",
|
|
|
|
"Unmap",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Unorm",
|
2017-09-07 21:52:13 +03:00
|
|
|
"Unpremultiplied",
|
2016-06-24 04:07:03 +03:00
|
|
|
"Unpremultiplying",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Unprepare",
|
|
|
|
"Unproject",
|
2017-08-25 00:41:10 +03:00
|
|
|
"Unpublish",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Uterance",
|
2016-07-19 15:04:15 +03:00
|
|
|
"Unentitled",
|
2017-07-20 18:16:46 +03:00
|
|
|
"Untrash",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Utf",
|
2017-07-18 19:12:10 +03:00
|
|
|
"Upce",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Uri",
|
2019-09-09 20:39:23 +03:00
|
|
|
"Usac", // Unified Speech and Audio Coding
|
2020-09-15 20:09:18 +03:00
|
|
|
"Usd", // Universal Scene Description
|
|
|
|
"Usdz", // USD zip
|
2016-05-05 03:14:32 +03:00
|
|
|
"Uti",
|
|
|
|
"Varispeed",
|
|
|
|
"Vergence",
|
2016-08-30 22:32:46 +03:00
|
|
|
"Voronoi",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Vnode",
|
|
|
|
"Vpn",
|
2019-06-25 19:26:03 +03:00
|
|
|
"Warichu",
|
2017-10-13 09:08:17 +03:00
|
|
|
"Wep",
|
|
|
|
"Wpa",
|
2016-08-03 20:12:07 +03:00
|
|
|
"Warpable",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Whitespaces",
|
2019-07-24 22:57:29 +03:00
|
|
|
"Wifes",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Writeability",
|
2017-11-28 23:29:05 +03:00
|
|
|
"Xnor",
|
2016-05-05 03:14:32 +03:00
|
|
|
"Xpc",
|
|
|
|
"xy",
|
|
|
|
"Xyz",
|
2017-10-05 21:32:25 +03:00
|
|
|
"Xzy",
|
2019-07-19 20:49:58 +03:00
|
|
|
"Yobibits",
|
|
|
|
"Yobibytes",
|
|
|
|
"Yottabits",
|
2017-10-05 21:32:25 +03:00
|
|
|
"Yxz",
|
|
|
|
"Yzx",
|
|
|
|
"Zxy",
|
|
|
|
"Zyx",
|
2018-11-07 17:52:39 +03:00
|
|
|
"Yuv",
|
|
|
|
"Yuvk",
|
2016-05-05 03:14:32 +03:00
|
|
|
"yuvs",
|
|
|
|
"yx",
|
|
|
|
"yy",
|
|
|
|
"Yyy",
|
2019-07-19 20:49:58 +03:00
|
|
|
"Zebibits",
|
|
|
|
"Zebibytes",
|
|
|
|
"Zettabits",
|
2018-05-11 22:54:31 +03:00
|
|
|
"Zlib",
|
2016-11-22 00:35:57 +03:00
|
|
|
#if MONOMAC
|
|
|
|
"Abbr",
|
|
|
|
"Accum",
|
2018-08-22 17:54:43 +03:00
|
|
|
"Ack", // TcpSetDisableAckStretching
|
2016-11-22 00:35:57 +03:00
|
|
|
"Addin",
|
|
|
|
"Addons",
|
|
|
|
"Appactive",
|
|
|
|
"Approx",
|
|
|
|
"Arae",
|
|
|
|
"Attr",
|
|
|
|
"Attributesfor",
|
|
|
|
"Autoresizin",
|
|
|
|
"Avc",
|
|
|
|
"Callpout",
|
|
|
|
"Ccitt",
|
|
|
|
"Commited",
|
|
|
|
"Constrainted",
|
|
|
|
"Ctm",
|
|
|
|
"Cymk",
|
|
|
|
"Cymka",
|
|
|
|
"Cmyka",
|
|
|
|
"Compat",
|
|
|
|
"Credendtials",
|
|
|
|
"Descriptorat",
|
|
|
|
"Descriptorfor",
|
|
|
|
"Dimensionsfor",
|
|
|
|
"Dissapearing",
|
2018-08-22 17:54:43 +03:00
|
|
|
"Distinguised", // ITLibPlaylistPropertyDistinguisedKind
|
2016-11-22 00:35:57 +03:00
|
|
|
"Dirs",
|
2018-08-22 17:54:43 +03:00
|
|
|
"Drm", // MediaItemProperty.IsDrmProtected
|
2016-11-22 00:35:57 +03:00
|
|
|
"Editability",
|
|
|
|
"Eisu",
|
|
|
|
"Entryat",
|
|
|
|
"Equiv",
|
|
|
|
"Fourty",
|
|
|
|
"Grammarl",
|
|
|
|
"Greeking",
|
|
|
|
"Hsb",
|
|
|
|
"Hsba",
|
|
|
|
"Ibss",
|
|
|
|
"Iconfor",
|
|
|
|
"Incrementor",
|
|
|
|
"Indexeffective",
|
|
|
|
"Indexestable",
|
|
|
|
"Itemto",
|
|
|
|
"Lowsrc",
|
|
|
|
"Lpcm",
|
|
|
|
"Lzw",
|
|
|
|
"Mihret",
|
|
|
|
"Mps",
|
|
|
|
"Nonenumerated",
|
|
|
|
"Nsevent",
|
|
|
|
"Numberof",
|
|
|
|
"Orginal",
|
|
|
|
"Parms",
|
|
|
|
"Pbm",
|
|
|
|
"Pde",
|
|
|
|
"Performwith",
|
|
|
|
"Phy",
|
|
|
|
"Pmgt",
|
|
|
|
"Preceeding",
|
|
|
|
"Preds",
|
|
|
|
"Previewable",
|
|
|
|
"Qtvr",
|
|
|
|
"Rangewith",
|
|
|
|
"Rangeswith",
|
|
|
|
"Reassociation",
|
|
|
|
"Rectfrom",
|
|
|
|
"Registeration",
|
|
|
|
"Segmentnew",
|
|
|
|
"Semitransient",
|
|
|
|
"Sixtyfour",
|
|
|
|
"Sourcei",
|
|
|
|
"Steppable",
|
|
|
|
"Stringto",
|
|
|
|
"Succesfully",
|
|
|
|
"Supression",
|
|
|
|
"Targetand",
|
|
|
|
"Tkip",
|
|
|
|
"Tsn",
|
|
|
|
"Tunesi",
|
|
|
|
"Twentyfour",
|
|
|
|
"Uneditable",
|
|
|
|
"Unfocus",
|
|
|
|
"Unpublish",
|
|
|
|
"Usec",
|
|
|
|
"Usedby",
|
|
|
|
"Viewwrite",
|
|
|
|
"Wep",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Wlan",
|
2016-11-22 00:35:57 +03:00
|
|
|
"Wme",
|
|
|
|
"Writeln",
|
|
|
|
"Xattr",
|
2017-11-23 04:52:10 +03:00
|
|
|
#endif
|
2022-02-09 10:26:37 +03:00
|
|
|
#if !NET
|
2017-11-23 04:52:10 +03:00
|
|
|
"Actionfrom",
|
2018-02-22 01:51:54 +03:00
|
|
|
"Asal", // Typo, should be 'Basal', fixed in 'HKInsulinDeliveryReason'
|
2017-11-23 04:52:10 +03:00
|
|
|
"Attributefor",
|
|
|
|
"Attributest",
|
|
|
|
"Failwith",
|
|
|
|
"Imageimage",
|
Fix a few introspection issues on Catalina. (#7212) (#7243)
* [SceneKit] Adjust deprecation message.
Fixes this introspection failure:
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Type: SCNLayer
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_OpenGLContext, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_OpenGLContext, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_PixelFormat, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_PixelFormat, Type: SCNView
* [AppKit] Adjust deprecation messages.
* [tests] Fix introspection and xammac tests on Catalina. (#7200)
* [tests] Adjust NaturalLanguage.EmbeddingTest to cope with non-existent embeddings. Fixes xamarin/maccore#2011.
Fixes https://github.com/xamarin/maccore/issues/2011.
* [tests] Fix typo test on macOS 10.15. Fixes #7116.
Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
* [introspection] Ignore MTLCounterSampleBufferDescriptor's selectors.
They're implemented using a different/internal type:
$ nm /System/Library/Frameworks/Metal.framework/Metal | grep MTLCounterSampleBuffer
00000000000458ab t +[MTLCounterSampleBufferDescriptor allocWithZone:]
0000000000045897 t +[MTLCounterSampleBufferDescriptor alloc]
000000000004591e t -[MTLCounterSampleBufferDescriptor copyWithZone:]
000000000004598e t -[MTLCounterSampleBufferDescriptorInternal copyWithZone:]
0000000000045c0f t -[MTLCounterSampleBufferDescriptorInternal counterSet]
0000000000045936 t -[MTLCounterSampleBufferDescriptorInternal dealloc]
0000000000045b65 t -[MTLCounterSampleBufferDescriptorInternal hash]
0000000000045a31 t -[MTLCounterSampleBufferDescriptorInternal isEqual:]
0000000000045c58 t -[MTLCounterSampleBufferDescriptorInternal label]
0000000000045c7f t -[MTLCounterSampleBufferDescriptorInternal sampleCount]
0000000000045c25 t -[MTLCounterSampleBufferDescriptorInternal setCounterSet:]
0000000000045c6e t -[MTLCounterSampleBufferDescriptorInternal setLabel:]
0000000000045c90 t -[MTLCounterSampleBufferDescriptorInternal setSampleCount:]
0000000000045c47 t -[MTLCounterSampleBufferDescriptorInternal setStorageMode:]
0000000000045c36 t -[MTLCounterSampleBufferDescriptorInternal storageMode]
000000000010b0b8 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptor
000000000010b0e0 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptorInternal
0000000000107070 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._counterSet
0000000000107078 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._label
0000000000107088 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._sampleCount
0000000000107080 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._storageMode
000000000010b108 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptor
000000000010b130 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptorInternal
Fixes these test failures:
1) ApiSelectorTest.InstanceMethods (Introspection.MacApiSelectorTest.ApiSelectorTest.InstanceMethods)
8 errors found in 26658 instance selector validated:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : counterSet
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setCounterSet:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : label
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setLabel:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : sampleCount
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setSampleCount:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : storageMode
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setStorageMode:
* [introspection] Ignore some API we've bound incorrectly. Fixes #7116.
There are also a few API fixes, those will be submitted in a different PR.
Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
2019-10-22 23:30:19 +03:00
|
|
|
"Libary",
|
2017-11-23 04:52:10 +03:00
|
|
|
"Musthold",
|
2018-02-22 01:51:54 +03:00
|
|
|
"Olus", // Typo, should be 'Bolus', fixed in 'HKInsulinDeliveryReason'
|
|
|
|
"Ostprandial", // Typo, should be 'Postprandial', fixed in 'HKBloodGlucoseMealTime'
|
2017-11-23 04:52:10 +03:00
|
|
|
"Pathpath",
|
|
|
|
"Rangefor",
|
2018-02-22 01:51:54 +03:00
|
|
|
"Reprandial", // Typo, should be 'Preprandial', fixed in 'HKBloodGlucoseMealTime'
|
2017-11-23 04:52:10 +03:00
|
|
|
"Failwith",
|
|
|
|
"Tearm",
|
|
|
|
"Theevent",
|
|
|
|
"Timestampe", // Existing binding so we can't just remove it.
|
|
|
|
"Toplevel",
|
|
|
|
"Tripple",
|
2016-05-05 03:14:32 +03:00
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
// ease maintenance of the list
|
|
|
|
HashSet<string> used = new HashSet<string> ();
|
|
|
|
|
|
|
|
bool SkipAllowed (string typeName, string methodName, string typo)
|
|
|
|
{
|
|
|
|
if (allowed.Contains (typo)) {
|
|
|
|
used.Add (typo);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool IsObsolete (MemberInfo mi)
|
|
|
|
{
|
|
|
|
if (mi == null)
|
|
|
|
return false;
|
|
|
|
if (mi.GetCustomAttributes<ObsoleteAttribute> (true).Any ())
|
|
|
|
return true;
|
2022-10-06 19:15:51 +03:00
|
|
|
if (MemberHasObsolete (mi))
|
2021-11-22 22:54:07 +03:00
|
|
|
return true;
|
2016-05-05 03:14:32 +03:00
|
|
|
return IsObsolete (mi.DeclaringType);
|
|
|
|
}
|
|
|
|
|
2020-09-30 14:53:48 +03:00
|
|
|
[Test]
|
|
|
|
public virtual void AttributeTypoTest ()
|
|
|
|
{
|
|
|
|
var types = Assembly.GetTypes ();
|
|
|
|
int totalErrors = 0;
|
|
|
|
foreach (Type t in types)
|
|
|
|
AttributeTypo (t, ref totalErrors);
|
|
|
|
|
|
|
|
Assert.AreEqual (0, totalErrors, "Attributes have typos!");
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttributeTypo (Type t, ref int totalErrors)
|
|
|
|
{
|
|
|
|
AttributesMessageTypoRules (t, t.Name, ref totalErrors);
|
|
|
|
|
|
|
|
foreach (var f in t.GetFields ())
|
|
|
|
AttributesMessageTypoRules (f, t.Name, ref totalErrors);
|
|
|
|
|
|
|
|
foreach (var p in t.GetProperties ())
|
|
|
|
AttributesMessageTypoRules (p, t.Name, ref totalErrors);
|
|
|
|
|
|
|
|
foreach (var m in t.GetMethods ())
|
|
|
|
AttributesMessageTypoRules (m, t.Name, ref totalErrors);
|
|
|
|
|
|
|
|
foreach (var e in t.GetEvents ())
|
|
|
|
AttributesMessageTypoRules (e, t.Name, ref totalErrors);
|
|
|
|
|
|
|
|
foreach (var nt in t.GetNestedTypes ())
|
|
|
|
AttributeTypo (nt, ref totalErrors);
|
|
|
|
}
|
|
|
|
|
2016-05-05 03:14:32 +03:00
|
|
|
[Test]
|
2018-11-22 21:24:55 +03:00
|
|
|
public virtual void TypoTest ()
|
2016-05-05 03:14:32 +03:00
|
|
|
{
|
|
|
|
var types = Assembly.GetTypes ();
|
|
|
|
int totalErrors = 0;
|
|
|
|
foreach (Type t in types) {
|
2017-06-27 01:17:06 +03:00
|
|
|
if (t.IsPublic) {
|
|
|
|
if (IsObsolete (t))
|
|
|
|
continue;
|
|
|
|
|
2016-05-05 03:14:32 +03:00
|
|
|
string txt = NameCleaner (t.Name);
|
2018-06-25 11:48:57 +03:00
|
|
|
var typo = GetCachedTypo (txt);
|
2022-11-07 17:20:26 +03:00
|
|
|
if (typo.Length > 0) {
|
2016-05-05 03:14:32 +03:00
|
|
|
if (!Skip (t, typo)) {
|
|
|
|
ReportError ("Typo in TYPE: {0} - {1} ", t.Name, typo);
|
|
|
|
totalErrors++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var fields = t.GetFields ();
|
|
|
|
foreach (FieldInfo f in fields) {
|
2017-06-27 01:17:06 +03:00
|
|
|
if (!f.IsPublic && !f.IsFamily)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (IsObsolete (f))
|
2016-05-05 03:14:32 +03:00
|
|
|
continue;
|
2022-11-07 17:20:26 +03:00
|
|
|
|
2016-05-05 03:14:32 +03:00
|
|
|
txt = NameCleaner (f.Name);
|
2018-06-25 11:48:57 +03:00
|
|
|
typo = GetCachedTypo (txt);
|
2016-05-05 03:14:32 +03:00
|
|
|
if (typo.Length > 0) {
|
|
|
|
if (!Skip (f, typo)) {
|
|
|
|
ReportError ("Typo in FIELD name: {0} - {1}, Type: {2}", f.Name, typo, t.Name);
|
|
|
|
totalErrors++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var methods = t.GetMethods ();
|
|
|
|
foreach (MethodInfo m in methods) {
|
2017-06-27 01:17:06 +03:00
|
|
|
if (!m.IsPublic && !m.IsFamily)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (IsObsolete (m))
|
2016-05-05 03:14:32 +03:00
|
|
|
continue;
|
2022-11-07 17:20:26 +03:00
|
|
|
|
2016-05-05 03:14:32 +03:00
|
|
|
txt = NameCleaner (m.Name);
|
2018-06-25 11:48:57 +03:00
|
|
|
typo = GetCachedTypo (txt);
|
2016-05-05 03:14:32 +03:00
|
|
|
if (typo.Length > 0) {
|
|
|
|
if (!Skip (m, typo)) {
|
|
|
|
ReportError ("Typo in METHOD name: {0} - {1}, Type: {2}", m.Name, typo, t.Name);
|
|
|
|
totalErrors++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#if false
|
|
|
|
var parameters = m.GetParameters ();
|
|
|
|
foreach (ParameterInfo p in parameters) {
|
|
|
|
txt = NameCleaner (p.Name);
|
2018-06-25 11:48:57 +03:00
|
|
|
typo = GetCachedTypo (txt);
|
2016-05-05 03:14:32 +03:00
|
|
|
if (typo.Length > 0) {
|
|
|
|
ReportError ("Typo in PARAMETER Name: {0} - {1}, Method: {2}, Type: {3}", p.Name, typo, m.Name, t.Name);
|
|
|
|
totalErrors++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#if false
|
|
|
|
// ease removal of unrequired values (but needs to be checked for every profile)
|
|
|
|
var unused = allowed.Except (used);
|
|
|
|
foreach (var typo in unused)
|
|
|
|
Console.WriteLine ("Unused entry \"{0}\"", typo);
|
|
|
|
#endif
|
2020-09-30 14:53:48 +03:00
|
|
|
Assert.AreEqual (0, totalErrors, "Typos!");
|
2016-05-05 03:14:32 +03:00
|
|
|
}
|
|
|
|
|
2017-06-27 01:17:06 +03:00
|
|
|
string GetMessage (object attribute)
|
|
|
|
{
|
|
|
|
string message = null;
|
|
|
|
if (attribute is AdviceAttribute)
|
2022-11-07 17:20:26 +03:00
|
|
|
message = ((AdviceAttribute) attribute).Message;
|
2017-06-27 01:17:06 +03:00
|
|
|
if (attribute is ObsoleteAttribute)
|
2022-11-07 17:20:26 +03:00
|
|
|
message = ((ObsoleteAttribute) attribute).Message;
|
2021-11-22 22:54:07 +03:00
|
|
|
#if !NET
|
2017-06-27 01:17:06 +03:00
|
|
|
if (attribute is AvailabilityBaseAttribute)
|
2022-12-05 10:23:34 +03:00
|
|
|
message = ((AvailabilityBaseAttribute) attribute).Message;
|
2021-11-22 22:54:07 +03:00
|
|
|
#endif
|
2017-06-27 01:17:06 +03:00
|
|
|
|
|
|
|
return message;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttributesMessageTypoRules (MemberInfo mi, string typeName, ref int totalErrors)
|
|
|
|
{
|
|
|
|
if (mi == null)
|
|
|
|
return;
|
|
|
|
|
|
|
|
foreach (object ca in mi.GetCustomAttributes ()) {
|
|
|
|
string message = GetMessage (ca);
|
|
|
|
if (message != null) {
|
|
|
|
var memberAndTypeFormat = mi.Name == typeName ? "Type: {0}" : "Member name: {1}, Type: {0}";
|
|
|
|
var memberAndType = string.Format (memberAndTypeFormat, typeName, mi.Name);
|
|
|
|
|
|
|
|
// Rule 1: https://github.com/xamarin/xamarin-macios/wiki/BINDINGS#rule-1
|
|
|
|
// Note: we don't enforce that rule for the Obsolete (not Obsoleted) attribute since the attribute itself doesn't support versions.
|
|
|
|
if (!(ca is ObsoleteAttribute)) {
|
|
|
|
var forbiddenOSNames = new [] { "iOS", "watchOS", "tvOS", "macOS" };
|
|
|
|
if (forbiddenOSNames.Any (s => Regex.IsMatch (message, $"({s} ?)[0-9]+"))) {
|
|
|
|
ReportError ("[Rule 1] Don't put OS information in attribute's message: \"{0}\" - {1}", message, memberAndType);
|
|
|
|
totalErrors++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Rule 2: https://github.com/xamarin/xamarin-macios/wiki/BINDINGS#rule-2
|
|
|
|
if (message.Contains ('`')) {
|
|
|
|
ReportError ("[Rule 2] Replace grave accent (`) by apostrophe (') in attribute's message: \"{0}\" - {1}", message, memberAndType);
|
|
|
|
totalErrors++;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Rule 3: https://github.com/xamarin/xamarin-macios/wiki/BINDINGS#rule-3
|
|
|
|
if (!message.EndsWith (".", StringComparison.Ordinal)) {
|
2018-08-01 04:20:16 +03:00
|
|
|
if (!allowedRule3.Contains (typeName)) {
|
|
|
|
ReportError ("[Rule 3] Missing '.' in attribute's message: \"{0}\" - {1}", message, memberAndType);
|
|
|
|
totalErrors++;
|
|
|
|
}
|
2017-06-27 01:17:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// Rule 4: https://github.com/xamarin/xamarin-macios/wiki/BINDINGS#rule-4
|
|
|
|
if (!allowedMemberRule4.Contains (mi.Name)) {
|
|
|
|
var forbiddenAvailabilityKeywords = new [] { "introduced", "deprecated", "obsolete", "obsoleted" };
|
|
|
|
if (forbiddenAvailabilityKeywords.Any (s => Regex.IsMatch (message, $"({s})", RegexOptions.IgnoreCase))) {
|
|
|
|
ReportError ("[Rule 4] Don't use availability keywords in attribute's message: \"{0}\" - {1}", message, memberAndType);
|
|
|
|
totalErrors++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var forbiddensWords = new [] { "OSX", "OS X" };
|
|
|
|
for (int i = 0; i < forbiddensWords.Length; i++) {
|
|
|
|
var word = forbiddensWords [i];
|
|
|
|
if (Regex.IsMatch (message, $"({word})", RegexOptions.IgnoreCase)) {
|
|
|
|
ReportError ("Don't use {0} in attribute's message: \"{1}\" - {2}", word, message, memberAndType);
|
|
|
|
totalErrors++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-25 11:48:57 +03:00
|
|
|
Dictionary<string, string> cached_typoes = new Dictionary<string, string> ();
|
|
|
|
string GetCachedTypo (string txt)
|
|
|
|
{
|
|
|
|
string rv;
|
|
|
|
if (!cached_typoes.TryGetValue (txt, out rv))
|
|
|
|
cached_typoes [txt] = rv = GetTypo (txt);
|
|
|
|
return rv;
|
|
|
|
}
|
2016-05-05 03:14:32 +03:00
|
|
|
public abstract string GetTypo (string txt);
|
|
|
|
|
|
|
|
static StringBuilder clean = new StringBuilder ();
|
|
|
|
|
|
|
|
static string NameCleaner (string name)
|
|
|
|
{
|
|
|
|
clean.Clear ();
|
|
|
|
foreach (char c in name) {
|
|
|
|
if (Char.IsUpper (c)) {
|
|
|
|
clean.Append (' ').Append (c);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (Char.IsDigit (c)) {
|
|
|
|
clean.Append (' ');
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
switch (c) {
|
|
|
|
case '<':
|
|
|
|
case '>':
|
|
|
|
case '_':
|
|
|
|
clean.Append (' ');
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
clean.Append (c);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return clean.ToString ();
|
|
|
|
}
|
2018-11-22 21:24:55 +03:00
|
|
|
|
|
|
|
bool CheckLibrary (string lib)
|
|
|
|
{
|
|
|
|
#if MONOMAC
|
|
|
|
// on macOS the file should exist on the specified path
|
|
|
|
// for iOS the simulator paths do not match the strings
|
2018-11-27 16:34:47 +03:00
|
|
|
switch (lib) {
|
|
|
|
// location changed in 10.8 but it loads fine (and fixing it breaks on earlier macOS)
|
|
|
|
case Constants.CFNetworkLibrary:
|
|
|
|
// location changed in 10.10 but it loads fine (and fixing it breaks on earlier macOS)
|
|
|
|
case Constants.CoreBluetoothLibrary:
|
|
|
|
// location changed in 10.11 but it loads fine (and fixing it breaks on earlier macOS)
|
|
|
|
case Constants.CoreImageLibrary:
|
|
|
|
break;
|
|
|
|
default:
|
2021-11-15 10:06:36 +03:00
|
|
|
if (TestRuntime.CheckSystemVersion (ApplePlatform.MacOSX, 11, 0)) {
|
2020-09-15 15:56:24 +03:00
|
|
|
// on macOS 11.0 the frameworks binary files are not present (cache) but can be loaded
|
|
|
|
if (!Directory.Exists (Path.GetDirectoryName (lib)))
|
|
|
|
return false;
|
|
|
|
} else if (!File.Exists (lib))
|
2018-11-24 02:25:31 +03:00
|
|
|
return false;
|
2018-11-27 16:34:47 +03:00
|
|
|
break;
|
2018-11-24 02:25:31 +03:00
|
|
|
}
|
2018-11-22 21:24:55 +03:00
|
|
|
#endif
|
|
|
|
var h = IntPtr.Zero;
|
|
|
|
try {
|
|
|
|
h = Dlfcn.dlopen (lib, 0);
|
|
|
|
if (h != IntPtr.Zero)
|
|
|
|
return true;
|
|
|
|
#if MONOMAC
|
|
|
|
// on macOS it might be wrong architecture
|
|
|
|
// i.e. 64 bits only (thin) libraries running on 32 bits process
|
|
|
|
if (IntPtr.Size == 4)
|
|
|
|
return true;
|
|
|
|
#endif
|
|
|
|
} finally {
|
|
|
|
Dlfcn.dlclose (h);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2021-11-04 13:13:23 +03:00
|
|
|
protected void AssertMatchingOSVersionAndSdkVersion ()
|
2018-11-22 21:24:55 +03:00
|
|
|
{
|
2020-10-02 05:30:04 +03:00
|
|
|
var sdk = new Version (Constants.SdkVersion);
|
|
|
|
#if MONOMAC
|
2021-11-04 13:13:23 +03:00
|
|
|
if (!NSProcessInfo.ProcessInfo.IsOperatingSystemAtLeastVersion (new NSOperatingSystemVersion (sdk.Major, sdk.Minor, sdk.Build == -1 ? 0 : sdk.Build)))
|
2020-10-02 05:30:04 +03:00
|
|
|
#elif __WATCHOS__
|
|
|
|
if (!WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (sdk.Major, sdk.Minor))
|
|
|
|
#else
|
|
|
|
if (!UIDevice.CurrentDevice.CheckSystemVersion (sdk.Major, sdk.Minor))
|
|
|
|
#endif
|
2021-11-04 13:13:23 +03:00
|
|
|
Assert.Ignore ($"This test only executes using the latest OS version ({sdk.Major}.{sdk.Minor})");
|
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void ConstantsCheck ()
|
|
|
|
{
|
|
|
|
// The constants are file paths for frameworks / dylibs
|
|
|
|
// unless the latest OS is used there's likely to be missing ones
|
|
|
|
// so we run this test only on the latest supported (matching SDK) OS
|
|
|
|
AssertMatchingOSVersionAndSdkVersion ();
|
2020-10-02 05:30:04 +03:00
|
|
|
|
2018-11-22 21:24:55 +03:00
|
|
|
var c = typeof (Constants);
|
|
|
|
foreach (var fi in c.GetFields ()) {
|
|
|
|
if (!fi.IsPublic)
|
|
|
|
continue;
|
|
|
|
var s = fi.GetValue (null) as string;
|
|
|
|
switch (fi.Name) {
|
|
|
|
case "Version":
|
|
|
|
case "SdkVersion":
|
|
|
|
Assert.True (Version.TryParse (s, out _), fi.Name);
|
|
|
|
break;
|
2022-02-09 10:26:37 +03:00
|
|
|
#if !NET
|
2018-11-22 21:24:55 +03:00
|
|
|
#if __TVOS__
|
|
|
|
case "PassKitLibrary": // not part of tvOS
|
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
case "libcompression": // bad (missing) suffix
|
|
|
|
Assert.True (CheckLibrary (s), fi.Name);
|
|
|
|
break;
|
|
|
|
#endif
|
2023-02-13 19:08:18 +03:00
|
|
|
case "ChipLibrary": // Chip is removed entirely beginning Xcode 14
|
|
|
|
if (!TestRuntime.CheckXcodeVersion (14, 0))
|
|
|
|
if (TestRuntime.IsDevice)
|
|
|
|
Assert.True (CheckLibrary (s), fi.Name);
|
|
|
|
break;
|
2020-07-29 03:55:28 +03:00
|
|
|
#if !__MACOS__
|
2021-08-27 01:15:31 +03:00
|
|
|
case "ThreadNetworkLibrary":
|
2020-07-17 03:34:19 +03:00
|
|
|
case "MediaSetupLibrary":
|
2020-07-29 03:55:28 +03:00
|
|
|
case "MLComputeLibrary":
|
2021-07-01 03:18:41 +03:00
|
|
|
// Xcode 12 beta 2 does not ship these framework/headers for the simulators
|
2021-12-16 00:32:14 +03:00
|
|
|
if (TestRuntime.IsDevice)
|
2020-07-17 03:34:19 +03:00
|
|
|
Assert.True (CheckLibrary (s), fi.Name);
|
|
|
|
break;
|
|
|
|
#endif
|
2018-11-22 21:24:55 +03:00
|
|
|
#if __TVOS__
|
|
|
|
case "MetalPerformanceShadersLibrary":
|
2022-05-10 11:52:22 +03:00
|
|
|
case "MetalPerformanceShadersGraphLibrary":
|
2018-11-22 21:24:55 +03:00
|
|
|
// not supported in tvOS (12.1) simulator so load fails
|
2021-12-16 00:32:14 +03:00
|
|
|
if (TestRuntime.IsSimulatorOrDesktop)
|
2018-11-22 21:24:55 +03:00
|
|
|
break;
|
|
|
|
goto default;
|
|
|
|
#endif
|
|
|
|
default:
|
|
|
|
if (fi.Name.EndsWith ("Library", StringComparison.Ordinal)) {
|
2019-02-08 07:17:19 +03:00
|
|
|
#if __IOS__
|
2020-09-16 12:41:44 +03:00
|
|
|
if (fi.Name == "CoreNFCLibrary") {
|
|
|
|
// NFC is currently not available on iPad
|
|
|
|
if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
|
|
|
|
continue;
|
|
|
|
// Phone works unless Xcode 12 on simulator
|
2021-12-16 00:32:14 +03:00
|
|
|
if (TestRuntime.IsSimulatorOrDesktop && TestRuntime.CheckXcodeVersion (12, 0))
|
2020-09-16 12:41:44 +03:00
|
|
|
continue;
|
|
|
|
}
|
2019-02-08 07:17:19 +03:00
|
|
|
#endif
|
2020-03-06 03:48:28 +03:00
|
|
|
#if __MACOS__
|
|
|
|
// Only available in macOS 10.15.4+
|
|
|
|
if (fi.Name == "AutomaticAssessmentConfigurationLibrary" && !TestRuntime.CheckXcodeVersion (11, 4))
|
|
|
|
continue;
|
|
|
|
#endif
|
2020-09-30 14:53:48 +03:00
|
|
|
#if __WATCHOS__
|
|
|
|
// added with watchOS 4 (mistake)
|
|
|
|
if (fi.Name == "VisionLibrary")
|
|
|
|
continue;
|
|
|
|
#endif
|
2018-11-22 21:24:55 +03:00
|
|
|
Assert.True (CheckLibrary (s), fi.Name);
|
|
|
|
} else {
|
|
|
|
Assert.Fail ($"Unknown '{fi.Name}' field cannot be verified - please fix me!");
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-05-05 03:14:32 +03:00
|
|
|
}
|
2016-08-09 15:11:44 +03:00
|
|
|
}
|