Skip to content
Open
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
10 changes: 6 additions & 4 deletions Decimal2D.Tests/Decimal2D.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Configurations>Debug;Release;DebugWithMessages</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
Expand All @@ -12,9 +12,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NUnit" Version="4.3.0" />
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0-beta.5" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions Decimal2D.Tests/Point2DTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ public class Point2DTests
public void TestConstructor(int x, int y)
{
var p = new Point2D(x, y);
Assert.AreEqual(p.X, x);
Assert.AreEqual(p.Y, y);
Assert.That(p.X, Is.EqualTo(x));
Assert.That(p.Y, Is.EqualTo(y));
}

[TestCase(0, 3, true)]
Expand All @@ -37,7 +37,7 @@ public void TestQuadrant(int x, int y, int quadrant)
public void TestQuadrantOnAxis(int x, int y)
{
var p = new Point2D(x, y);
Assert.Throws<Exception>(() => {var q = p.Quadrant;});
Assert.Throws<Exception>(() => { var q = p.Quadrant; });
}

[TestCase("0", "3", "0", "3", "0")]
Expand All @@ -47,7 +47,7 @@ public void TestDistanceTo(string x1, string y1, string x2, string y2, string di
{
var p1 = new Point2D(Convert.ToDecimal(x1), Convert.ToDecimal(y1));
var p2 = new Point2D(Convert.ToDecimal(x2), Convert.ToDecimal(y2));
Assert.AreEqual(p1.DistanceTo(p2), Convert.ToDecimal(distance));
Assert.That(p1.DistanceTo(p2), Is.EqualTo(Convert.ToDecimal(distance)));
}
}
}
2 changes: 1 addition & 1 deletion Decimal2D/Decimal2D.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Description>Portable math support for Decimal-based geometric and trigonometric calculations.</Description>
<Authors>Nathan P Jones</Authors>
<PackageId>DecimalMath.Decimal2D</PackageId>
Expand Down
10 changes: 6 additions & 4 deletions DecimalEx.Tests/DecimalEx.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Configurations>Debug;Release;DebugWithMessages</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
Expand All @@ -12,9 +12,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NUnit" Version="4.3.0" />
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0-beta.5" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion DecimalEx.Tests/DecimalExTests/SqrtTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void TestRange()
Debug.WriteLine("Sqrt({0})={1}", i, DecimalEx.Sqrt(i));
reset.Set();
});
Assert.IsTrue(reset.WaitOne(30000));
Assert.That(reset.WaitOne(30000),Is.True);

step *= 1.01m;
try { i += step; }
Expand Down
2 changes: 1 addition & 1 deletion DecimalEx/DecimalEx.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Description>Portable math support for Decimal that Microsoft forgot and more.

Includes Decimal versions of Sqrt, Pow, Exp, and Log as well as the trig functions Sin, Cos, Tan, ASin, ACos, ATan, ATan2.
Expand Down