diff --git a/Issue4681/Issue4681.csproj b/Issue4681/Issue4681.csproj new file mode 100644 index 0000000..c5d7e12 --- /dev/null +++ b/Issue4681/Issue4681.csproj @@ -0,0 +1,19 @@ + + + + net8.0;net48 + false + true + True + true + nunit.snk + + + + + + + + + + diff --git a/Issue4681/Issue4681.sln b/Issue4681/Issue4681.sln new file mode 100644 index 0000000..732c0ac --- /dev/null +++ b/Issue4681/Issue4681.sln @@ -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 diff --git a/Issue4681/UnitTest1.cs b/Issue4681/UnitTest1.cs new file mode 100644 index 0000000..e41e8f6 --- /dev/null +++ b/Issue4681/UnitTest1.cs @@ -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()); + } +} \ No newline at end of file diff --git a/Issue4681/nunit.snk b/Issue4681/nunit.snk new file mode 100644 index 0000000..db2cc7f Binary files /dev/null and b/Issue4681/nunit.snk differ