Skip to content

Commit

Permalink
Misc test fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Oct 15, 2024
1 parent 1b6628f commit bfb8635
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/storekit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
// Copyright 2012 Xamarin Inc.
// Copyright 2020 Microsoft Corp.
//

using System.ComponentModel;

using ObjCRuntime;
using Foundation;
using CoreFoundation;
Expand All @@ -34,6 +37,7 @@

namespace StoreKit {

[EditorBrowsable (EditorBrowsableState.Never)]
[Internal]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
Expand Down
11 changes: 7 additions & 4 deletions tests/cecil-tests/AttributeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ public void FindSupportedOnElementsThatDoNotExistInThatAssembly ()
// Walk every class/struct/enum/property/method/enum value/pinvoke/event
foreach (var module in assembly.Modules) {
foreach (var type in module.Types) {
if (!type.IsPubliclyVisible ())
continue;

switch (type.Namespace) {
case "AppKit":
case "UIKit":
Expand Down Expand Up @@ -289,10 +292,6 @@ static HashSet<string> IgnoreElementsThatDoNotExistInThatAssembly {

// These methods have different optional/required semantics between platforms.
"PassKit.PKPaymentAuthorizationControllerDelegate_Extensions.GetPresentationWindow (PassKit.IPKPaymentAuthorizationControllerDelegate, PassKit.PKPaymentAuthorizationController)",
"Metal.MTLTextureWrapper.FirstMipmapInTail",
"Metal.MTLTextureWrapper.IsSparse",
"Metal.MTLTextureWrapper.TailSizeInBytes",


// HKSeriesBuilder doesn't implement the ISNCopying protocol on all platforms (and shouldn't on any according to the headers, so removed for XAMCORE_5_0).
"HealthKit.HKSeriesBuilder.EncodeTo (Foundation.NSCoder)",
Expand Down Expand Up @@ -325,6 +324,10 @@ static HashSet<string> IgnoreElementsThatDoNotExistInThatAssembly {
"Foundation.NSAttributedString.ReadableTypeIdentifiers",
"Foundation.NSAttributedString.WritableTypeIdentifiers",
"Foundation.NSAttributedString.WritableTypeIdentifiersForItemProvider",

// Same method, but different arguments due to platform differences. We should treat this as the same method, so ignore this failure.
"StoreKit.AppStore.RequestReview (XKit.XWindowScene)", // iOS, MacCatalyst
"StoreKit.AppStore.RequestReview (XKit.XViewController)", // macOS
};
}
}
Expand Down
3 changes: 3 additions & 0 deletions tests/introspection/ApiProtocolTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ static bool ConformTo (IntPtr klass, IntPtr protocol)

protected virtual bool Skip (Type type)
{
if (MemberHasEditorBrowsableNever (type))
return true;

switch (type.Namespace) {
// Xcode 15:
case "MetalFX":
Expand Down
3 changes: 3 additions & 0 deletions tests/introspection/ApiSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public abstract class ApiSelectorTest : ApiBaseTest {

protected virtual bool Skip (Type type)
{
if (MemberHasEditorBrowsableNever (type))
return true;

if (type.ContainsGenericParameters)
return true;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This is one of our own types.
!unknown-type! XamarinSwiftFunctions bound

0 comments on commit bfb8635

Please sign in to comment.