Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAST-187: Upgrade to .NET 6 #5

Merged
merged 3 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
721 changes: 359 additions & 362 deletions BitMask/BitMask.cs

Large diffs are not rendered by default.

393 changes: 196 additions & 197 deletions Lombiq.Arithmetics.Tests/BitMaskTests.cs

Large diffs are not rendered by default.

29 changes: 14 additions & 15 deletions Lombiq.Arithmetics.Tests/CompatibilityAssert.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
using Xunit.Sdk;

namespace Lombiq.Arithmetics.Tests
namespace Lombiq.Arithmetics.Tests;

public static class CompatibilityAssert
{
public static class CompatibilityAssert
{
public static void AreEqual<T>(T actual, T expected) => Xunit.Assert.Equal(expected, actual);
public static void AreEqual<T>(T actual, T expected) => Xunit.Assert.Equal(expected, actual);

public static void AreEqual(uint actual, int expected) => Xunit.Assert.Equal((uint)expected, actual);
public static void AreEqual(uint actual, int expected) => Xunit.Assert.Equal((uint)expected, actual);

public static void AreEqual(int actual, uint expected) => Xunit.Assert.Equal(expected, (uint)actual);
public static void AreEqual(int actual, uint expected) => Xunit.Assert.Equal(expected, (uint)actual);

public static void AreEqual<T>(T actual, T expected, string userMessage)
public static void AreEqual<T>(T actual, T expected, string userMessage)
{
try
{
Xunit.Assert.Equal(expected, actual);
}
catch (EqualException)
{
try
{
Xunit.Assert.Equal(expected, actual);
}
catch (EqualException)
{
Xunit.Assert.True(false, userMessage);
}
Xunit.Assert.True(false, userMessage);
}
}
}
2 changes: 1 addition & 1 deletion Lombiq.Arithmetics.Tests/Lombiq.Arithmetics.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
Expand Down
Loading