Skip to content

Commit

Permalink
.NET 7 (#2836)
Browse files Browse the repository at this point in the history
* .NET 7

* Fix UT
  • Loading branch information
erikzhang authored Dec 27, 2022
1 parent f88d4f8 commit ee93a8d
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:

env:
DOTNET_VERSION: 6.0.x
DOTNET_VERSION: 7.0.x

This comment has been minimized.

Copy link
@gsmachado

gsmachado Feb 20, 2023

Contributor

By updating to 7.0.x, shouldn't we change this and this as well? Just reminding.

@superboyiii


jobs:

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Neo.Benchmarks/Neo.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>Neo</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Copyright>2015-2022 The Neo Project</Copyright>
<VersionPrefix>3.5.0</VersionPrefix>
<Authors>The Neo Project</Authors>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<PackageProjectUrl>https://github.com/neo-project/neo</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
Expand Down
2 changes: 1 addition & 1 deletion src/Neo/Neo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Akka" Version="1.4.46" />
<PackageReference Include="Akka" Version="1.4.47" />
<PackageReference Include="BouncyCastle.NetCore" Version="1.9.0" />
<PackageReference Include="K4os.Compression.LZ4" Version="1.2.16" />
<PackageReference Include="Neo.VM" Version="3.5.0" />
Expand Down
8 changes: 4 additions & 4 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.1" />
<PackageReference Include="coverlet.collector" Version="3.2.0" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions tests/Neo.UnitTests/Neo.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Akka.TestKit" Version="1.4.46" />
<PackageReference Include="Akka.TestKit.Xunit2" Version="1.4.46" />
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="Akka.TestKit" Version="1.4.47" />
<PackageReference Include="Akka.TestKit.Xunit2" Version="1.4.47" />
<PackageReference Include="Moq" Version="4.18.3" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions tests/Neo.UnitTests/SmartContract/UT_KeyBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Neo.UnitTests.SmartContract
[TestClass]
public class UT_KeyBuilder
{
private struct a
private struct A
{
public int x;
}
Expand All @@ -28,11 +28,11 @@ public void Test()
Assert.AreEqual("010000000203040000000000000000000000000000000000000000", key.ToArray().ToHexString());

key = new KeyBuilder(1, 2);
key = key.Add(new a() { x = 123 });
key = key.Add(new A() { x = 123 });
Assert.AreEqual("01000000027b000000", key.ToArray().ToHexString());

key = new KeyBuilder(1, 0);
key = key.AddBigEndian(new a() { x = 1 });
key = key.AddBigEndian(new A() { x = 1 });
Assert.AreEqual("010000000000000001", key.ToArray().ToHexString());
}
}
Expand Down
5 changes: 3 additions & 2 deletions tests/Neo.UnitTests/Wallets/UT_KeyPair.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ public void TestGetHashCode()
{
byte[] privateKey = { 0x01,0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01};
KeyPair keyPair = new KeyPair(privateKey);
keyPair.GetHashCode().Should().Be(1544360595);
KeyPair keyPair1 = new KeyPair(privateKey);
KeyPair keyPair2 = new KeyPair(privateKey);
keyPair1.GetHashCode().Should().Be(keyPair2.GetHashCode());
}

[TestMethod]
Expand Down

0 comments on commit ee93a8d

Please sign in to comment.