Skip to content

Commit 16b81ad

Browse files
committed
Disable DelegateTypesAreValid and DelegateTypesHaveAttributes tests on .NET 7+ build, see comments
1 parent ac124fe commit 16b81ad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/Tests/ApiTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public class ApiTest : BaseTest
5656
public static IEnumerable<object[]> InteropDelegatesData =>
5757
InteropDelegates.Select(m => new object[] { m });
5858

59+
// Targets using USE_LIBRARY_IMPORT don't have delegates generated as they are not used.
60+
#if !USE_LIBRARY_IMPORT
5961
[Trait(Traits.Category.Key, Traits.Category.Values.Api)]
6062
[SkippableFact]
6163
public void DelegateTypesAreValid()
@@ -71,6 +73,7 @@ public void DelegateTypesHaveAttributes(Type delegateType)
7173
{
7274
Assert.NotNull(delegateType.GetCustomAttribute<UnmanagedFunctionPointerAttribute>());
7375
}
76+
#endif
7477

7578
[Trait(Traits.Category.Key, Traits.Category.Values.Api)]
7679
[SkippableTheory]

0 commit comments

Comments
 (0)