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

Upgrade target frameworks #67

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion BigDecimal/BigDecimal.Trigonometry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ public static BigDecimal Arcsin(BigDecimal radians)
/// <summary>Arbitrary precision inverse sine function.</summary>
/// <param name="radians">An angle, measured in radians, in the domain of -1 &lt; x &lt; 1</param>
/// <param name="precision">The desired precision in terms of the number of digits to the right of the decimal.</param>
/// <exception cref="ArgumentOutOfRangeException">The domain of <paramref name="Arcsin" /> is -1 &lt; x &lt; 1</exception>
/// <exception cref="ArgumentOutOfRangeException">The domain of <paramref name="radians" /> is -1 &lt; x &lt; 1</exception>
/// <returns>The inverse sine of <paramref name="radians"/>, in radians.</returns>
/// <exception cref="ArgumentOutOfRangeException">Argument <paramref name="radians"/> outside the domain of -1 &lt; x &lt; 1.</exception>
public static BigDecimal Arcsin(BigDecimal radians, int precision)
Expand Down
9 changes: 1 addition & 8 deletions BigDecimal/BigDecimal.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net45;net46;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net9.0</TargetFrameworks>
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputType>Library</OutputType>
<Nullable>annotations</Nullable>
Expand Down Expand Up @@ -82,13 +82,6 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Roslynator.Analyzers" Version="4.12.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\LanguageResources.Designer.cs">
<DesignTime>True</DesignTime>
Expand Down
8 changes: 4 additions & 4 deletions TestBigDecimal/TestBigDecimal.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net45;net46;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFramework>net9.0</TargetFramework>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>latest</LangVersion>
<AnalysisLevel>latest</AnalysisLevel>
Expand Down Expand Up @@ -46,10 +46,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.1.0" />
<PackageReference Include="NUnit" Version="4.3.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BigDecimal\BigDecimal.csproj" />
Expand Down
37 changes: 17 additions & 20 deletions TestBigDecimal/TestBigDecimalConversion.cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
using System;
using System.Numerics;
using System.Numerics;
using ExtendedNumerics;
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace TestBigDecimal
namespace BigDecimalTests;

[Parallelizable(ParallelScope.All)]
[TestFixture]
public class TestBigDecimalConversion
{
private const string LongNumbers =
"122685077023934456384565345644576454645163485274775618673867785678763896936969078786987890789798927897383149150201282920942551781108927727789384397020382853" +
"222685077023934456384565345644576454645163485274775618673867785678763896936969078786987890789798927897383149150201282920942551781108927727789384397020382853" +
"322685077023934456384565345644576454645163485274775618673867785678763896936969078786987890789798927897383149150201282920942551781108927727789384397020382853";

[Parallelizable(ParallelScope.All)]
[TestFixture]
[Culture("en-US,ru-RU")]
public class TestBigDecimalConversion
[Test]
public void TestConversionFromBigInteger()
{
private const String LongNumbers =
"122685077023934456384565345644576454645163485274775618673867785678763896936969078786987890789798927897383149150201282920942551781108927727789384397020382853" +
"222685077023934456384565345644576454645163485274775618673867785678763896936969078786987890789798927897383149150201282920942551781108927727789384397020382853" +
"322685077023934456384565345644576454645163485274775618673867785678763896936969078786987890789798927897383149150201282920942551781108927727789384397020382853";

[Test]
public void TestConversionFromBigInteger()
{
var expected = BigInteger.Parse(LongNumbers);
var expected = BigInteger.Parse(LongNumbers);

var bigDecimal = BigDecimal.Parse(LongNumbers);
var actual = bigDecimal.WholeValue;
var bigDecimal = BigDecimal.Parse(LongNumbers);
var actual = bigDecimal.WholeValue;

Assert.AreEqual(expected, actual);
}
ClassicAssert.AreEqual(expected, actual);
}
}
Loading