Skip to content

Commit

Permalink
Issue4681
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenaw committed Apr 16, 2024
1 parent bf0381c commit 90608b7
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Issue4681/Issue4681.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net48</TargetFrameworks>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<SignAssembly>True</SignAssembly>
<PublicSign>true</PublicSign>
<AssemblyOriginatorKeyFile>nunit.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="InvertedTomato.Crc" Version="1.3.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

</Project>
22 changes: 22 additions & 0 deletions Issue4681/Issue4681.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Issue4681", "Issue4681.csproj", "{491A5BD4-1DCE-48C1-92AA-D39307FCD7A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{491A5BD4-1DCE-48C1-92AA-D39307FCD7A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{491A5BD4-1DCE-48C1-92AA-D39307FCD7A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{491A5BD4-1DCE-48C1-92AA-D39307FCD7A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{491A5BD4-1DCE-48C1-92AA-D39307FCD7A0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
19 changes: 19 additions & 0 deletions Issue4681/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using InvertedTomato.Crc;
using NUnit.Framework;
using System.Text;
using System;

public class Tests
{
[Test]
public void BugReport()
{
var crc = CrcAlgorithm.CreateCrc16CcittFalse();

// Give it some bytes to chew on - you can call this multiple times if needed
crc.Append(Encoding.ASCII.GetBytes("Hurray for cake!"));

// Get the output - as a hex string, byte array or unsigned integer
Console.WriteLine(crc.ToHexString());
}
}
Binary file added Issue4681/nunit.snk
Binary file not shown.

0 comments on commit 90608b7

Please sign in to comment.