Skip to content

Commit 8b8700b

Browse files
committed
Add analyzer tests
1 parent 7106084 commit 8b8700b

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

tests/NetEscapades.EnumGenerators.IntegrationTests/.editorconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ dotnet_diagnostic.NEEG005.severity = error
99
dotnet_diagnostic.NEEG006.severity = error
1010
dotnet_diagnostic.NEEG007.severity = error
1111
dotnet_diagnostic.NEEG008.severity = error
12-
dotnet_diagnostic.NEEG009.severity = error
12+
dotnet_diagnostic.NEEG009.severity = error
13+
dotnet_diagnostic.NEEG010.severity = error

tests/NetEscapades.EnumGenerators.IntegrationTests/AnalyzerTests.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,15 @@ public void Neeg009Testing()
121121
#endif
122122
#pragma warning restore NEEG009
123123
}
124+
125+
#if NET7_0_OR_GREATER
126+
[Fact]
127+
public void Neeg010Testing()
128+
{
129+
#pragma warning disable NEEG010
130+
_ = Enum.GetValuesAsUnderlyingType(typeof(FlagsEnum));
131+
_ = Enum.GetValuesAsUnderlyingType<FlagsEnum>().Length;
132+
#pragma warning restore NEEG010
133+
}
134+
#endif
124135
}

0 commit comments

Comments
 (0)