Skip to content

Commit

Permalink
fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DeagleGross committed Oct 4, 2024
1 parent e359813 commit 85eaadc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions test/Dapper.AOT.Test/Helpers/TestFramework.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ namespace Dapper.AOT.Test.Helpers
{
internal static class TestFramework
{
public static ISet<string> NetVersions
= ((NET[])Enum.GetValues(typeof(NET)))
public static readonly ISet<string> NetVersions
= ((Net[])Enum.GetValues(typeof(Net)))
.Select(static x => x.ToString())
.ToHashSet();

public static NET DetermineNetVersion()
public static Net DetermineNetVersion()
{
#if NET6_0_OR_GREATER
return NET.net6;
return Net.Net6;
#endif
return NET.net48;
return Net.Net48;

Check warning on line 19 in test/Dapper.AOT.Test/Helpers/TestFramework.cs

View workflow job for this annotation

GitHub Actions / build

Unreachable code detected

Check warning on line 19 in test/Dapper.AOT.Test/Helpers/TestFramework.cs

View workflow job for this annotation

GitHub Actions / build

Unreachable code detected

Check warning on line 19 in test/Dapper.AOT.Test/Helpers/TestFramework.cs

View workflow job for this annotation

GitHub Actions / build

Unreachable code detected

Check warning on line 19 in test/Dapper.AOT.Test/Helpers/TestFramework.cs

View workflow job for this annotation

GitHub Actions / build

Unreachable code detected
}

public enum NET
public enum Net
{
net48,
net6
Net48,
Net6
}
}
}
2 changes: 1 addition & 1 deletion test/Dapper.AOT.Test/InterceptorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static IEnumerable<object[]> GetFiles()
if (TestFramework.NetVersions.Contains(fileNetVersionStr))
{
// it has to be the same or greater version
var fileNetVersion = (TestFramework.NET)Enum.Parse(typeof(TestFramework.NET), fileNetVersionStr);
var fileNetVersion = (TestFramework.Net)Enum.Parse(typeof(TestFramework.Net), fileNetVersionStr);
if (currentNetVersion < fileNetVersion)
{
// skip if current version is lower than specified in the input file name
Expand Down

0 comments on commit 85eaadc

Please sign in to comment.