-
Notifications
You must be signed in to change notification settings - Fork 567
Expand file tree
/
Copy pathiOSApiWeakPropertyTest.cs
More file actions
51 lines (44 loc) · 1.67 KB
/
iOSApiWeakPropertyTest.cs
File metadata and controls
51 lines (44 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using System.Reflection;
using Foundation;
using NUnit.Framework;
// Disable until we get around to enable + fix any issues.
#nullable disable
namespace Introspection {
[TestFixture]
// we want the tests to be available because we use the linker
[Preserve (AllMembers = true)]
public class iOSApiWeakPropertyTest : ApiWeakPropertyTest {
public iOSApiWeakPropertyTest ()
{
ContinueOnFailure = true;
}
protected override bool Skip (PropertyInfo property)
{
switch (property.DeclaringType.Name) {
// WeakVideoGravity is an NSString that we could/should provide a better binding (e.g. enum)
case "AVPlayerViewController":
return property.Name == "WeakVideoGravity";
// CATextLayer.WeakFont is done correctly by hand
case "CATextLayer":
return property.Name == "WeakFont";
// NSAttributedStringDocumentAttributes is a DictionaryContainer that expose some Weak* NSDictionary
case "NSAttributedStringDocumentAttributes":
return property.Name == "WeakDocumentType" || property.Name == "WeakDefaultAttributes";
// UIFontAttributes is a DictionaryContainer that expose a Weak* NSDictionary
case "UIFontAttributes":
return property.Name == "WeakFeatureSettings";
// UIStringAttributes is a DictionaryContainer that expose a Weak* NSString
case "UIStringAttributes":
return property.Name == "WeakTextEffect";
// VNImageOptions is a DictionaryContainer that exposes a Weak* NSDictionary
case "VNImageOptions":
return property.Name == "WeakProperties";
// NSString manually bound as smart enum CLSContextTopic
case "CLSContext":
return property.Name == "WeakTopic";
}
return base.Skip (property);
}
}
}