Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions tests/introspection/ApiSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1309,9 +1309,6 @@ void Process (IntPtr class_ptr, Type t, MethodBase m, ref int n)

void CheckInit (Type t, MethodBase m, string name)
{
if (SkipInit (name, m))
return;

bool init = IsInitLike (name);
if (m is ConstructorInfo) {
if (!init)
Expand All @@ -1334,57 +1331,6 @@ bool IsInitLike (string selector)
return selector.Length < 5 || Char.IsUpper (selector [4]);
}

protected virtual bool SkipInit (string selector, MethodBase m)
{
switch (selector) {
// MPSGraphExecutable
case "initWithMPSGraphPackageAtURL:compilationDescriptor:":
case "initWithCoreMLPackageAtURL:compilationDescriptor:":
// GKScore
case "initWithCategory:":
case "initWithLeaderboardIdentifier:":
// INSetProfileInCarIntent and INSaveProfileInCarIntent
case "initWithProfileNumber:profileName:defaultProfile:":
case "initWithProfileNumber:profileLabel:defaultProfile:":
case "initWithProfileNumber:profileName:":
case "initWithProfileNumber:profileLabel:":
// UISegmentedControl
case "initWithItems:":
// CLBeaconRegion
case "initWithUUID:identifier:":
case "initWithUUID:major:identifier:":
case "initWithUUID:major:minor:identifier:":
var mi = m as MethodInfo;
return mi is not null && !mi.IsPublic && (mi.ReturnType.Name == "IntPtr" || mi.ReturnType.Name == "NativeHandle");
// NSAppleEventDescriptor
case "initListDescriptor":
case "initRecordDescriptor":
// SharedWithYouCore
case "initWithLocalIdentifier:":
case "initWithCollaborationIdentifier:":
return true;
// DDDevicePickerViewController
case "initWithBrowseDescriptor:parameters:":
return true;
// MKAddressFilter
case "initExcludingOptions:":
case "initIncludingOptions:":
return true;
// GKGameCenterViewController
case "initWithAchievementID:":
case "initWithLeaderboardSetID:":
return true;
case "initWithBytes:length:":
switch (m.DeclaringType.Name) {
case "FSFileName":
return true;
}
return false;
default:
return false;
}
}

protected virtual void Dispose (NSObject obj, Type type)
{
obj.Dispose ();
Expand Down
12 changes: 0 additions & 12 deletions tests/introspection/MacApiSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1216,17 +1216,5 @@ protected override bool CheckStaticResponse (bool value, Type actualType, Type d
}
return base.CheckStaticResponse (value, actualType, declaredType, method, ref name);
}

protected override bool SkipInit (string selector, MethodBase m)
{
switch (selector) {
// Cinematic.CNDecision
case "initWithTime:detectionGroupID:strong:":
case "initWithTime:detectionID:strong:":
return true;
default:
return base.SkipInit (selector, m);
}
}
}
}
Loading