Skip to content

Commit

Permalink
Exclude generated types from unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmylewis committed Jan 7, 2025
1 parent a63ab20 commit d6b5c7e
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion tests/NuGet.Services.Contracts.Tests/ContractsFacts.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Linq;
Expand All @@ -19,6 +19,44 @@ public void ShouldOnlyHaveInterfacesAndEnums()
// included in the assembly by newer language versions
"Microsoft.CodeAnalysis.EmbeddedAttribute",
"System.Runtime.CompilerServices.RefSafetyRulesAttribute",
// generated polyfills from PolySharp
"System.Runtime.CompilerServices.NullableAttribute",
"System.Runtime.CompilerServices.NullableContextAttribute",
"System.Index",
"System.Range",
"System.Runtime.Versioning.RequiresPreviewFeaturesAttribute",
"System.Runtime.CompilerServices.AsyncMethodBuilderAttribute",
"System.Runtime.CompilerServices.CallerArgumentExpressionAttribute",
"System.Runtime.CompilerServices.CollectionBuilderAttribute",
"System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute",
"System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute",
"System.Runtime.CompilerServices.InterpolatedStringHandlerAttribute",
"System.Runtime.CompilerServices.IsExternalInit",
"System.Runtime.CompilerServices.ModuleInitializerAttribute",
"System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute",
"System.Runtime.CompilerServices.ParamCollectionAttribute",
"System.Runtime.CompilerServices.RequiredMemberAttribute",
"System.Runtime.CompilerServices.RequiresLocationAttribute",
"System.Runtime.CompilerServices.SkipLocalsInitAttribute",
"System.Diagnostics.CodeAnalysis.AllowNullAttribute",
"System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute",
"System.Diagnostics.CodeAnalysis.DisallowNullAttribute",
"System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute",
"System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute",
"System.Diagnostics.CodeAnalysis.ExperimentalAttribute",
"System.Diagnostics.CodeAnalysis.MaybeNullAttribute",
"System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute",
"System.Diagnostics.CodeAnalysis.MemberNotNullAttribute",
"System.Diagnostics.CodeAnalysis.MemberNotNullWhenAttribute",
"System.Diagnostics.CodeAnalysis.NotNullAttribute",
"System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute",
"System.Diagnostics.CodeAnalysis.NotNullWhenAttribute",
"System.Diagnostics.CodeAnalysis.SetsRequiredMembersAttribute",
"System.Diagnostics.CodeAnalysis.StringSyntaxAttribute",
"System.Diagnostics.CodeAnalysis.UnscopedRefAttribute",
"System.Index+ThrowHelper",
"System.Range+HashHelpers",
"System.Range+ThrowHelper",
};

// Act
Expand Down

0 comments on commit d6b5c7e

Please sign in to comment.