Skip to content

Commit a6280fd

Browse files
test: target both .NET 8 & .NET Framework 4.7.2
1 parent cd1d04b commit a6280fd

6 files changed

Lines changed: 13 additions & 17 deletions

File tree

Directory.Build.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<VersionSuffix Condition="'$(Configuration)' == 'Debug' And ('$(GITHUB_ACTIONS)' == 'true' Or '$(TF_BUILD)' == 'true')">
1212
-beta.$(GITHUB_RUN_NUMBER)
1313
</VersionSuffix>
14-
14+
15+
<TargetFrameworks>net10.0;net8.0;net472;netstandard2.0</TargetFrameworks>
1516
<PackageVersion>$(Version)$(VersionSuffix)</PackageVersion>
1617
<AssemblyName>$(ProjectName)</AssemblyName>
1718
<Company>The Aridity Team</Company>

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="6.0.0" />
1717
<PackageVersion Include="PolyType" Version="1.0.0" />
1818

19-
<PackageVersion Include="xunit" Version="2.6.6" />
20-
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.6" />
19+
<PackageVersion Include="xunit" Version="2.9.3" />
20+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
2121
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
2222
<PackageVersion Include="Moq" Version="4.20.70" />
2323
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />

src/AridityTeam.Ascorbic.Tests/AridityTeam.Ascorbic.Tests.csproj

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net10.0</TargetFramework>
5-
<ImplicitUsings>disable</ImplicitUsings>
6-
<Nullable>enable</Nullable>
4+
<TargetFrameworks>net8.0;net472</TargetFrameworks>
75
<RootNamespace>AridityTeam.Ascorbic.Tests</RootNamespace>
8-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
9-
106
<IsPackable>false</IsPackable>
117
<IsTestProject>true</IsTestProject>
12-
<Platforms>AnyCPU;x64;x86</Platforms>
138
</PropertyGroup>
149

1510
<ItemGroup>
1611
<PackageReference Include="Microsoft.NET.Test.Sdk" />
1712
<PackageReference Include="xunit" />
18-
<PackageReference Include="xunit.runner.visualstudio">
13+
<PackageReference Include="xunit.runner.visualstudio" NoWarn="NU1701">
1914
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2015
<PrivateAssets>all</PrivateAssets>
2116
</PackageReference>

src/AridityTeam.Ascorbic.Tests/AssumesTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
2+
using System.IO;
23
using System.Collections.Generic;
3-
using System.Globalization;
44
using System.Linq;
5-
using System.Text;
5+
using System.Runtime.Serialization.Formatters.Binary;
66

77
using Moq;
88

src/AridityTeam.Ascorbic.Tests/Mathematics/MathUtilTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class MathUtilTests
1414
[InlineData(10, 10, 10, 10)]
1515
public void Clamp_Int_Works(int value, int min, int max, int expected)
1616
{
17-
int result = MathHelper.Clamp(value, min, max);
17+
int result = MathUtil.Clamp(value, min, max);
1818
Assert.Equal(expected, result);
1919
}
2020

@@ -24,7 +24,7 @@ public void Clamp_Int_Works(int value, int min, int max, int expected)
2424
[InlineData(15.5, 1.0, 10.0, 10.0)]
2525
public void Clamp_Double_Works(double value, double min, double max, double expected)
2626
{
27-
double result = MathHelper.Clamp(value, min, max);
27+
double result = MathUtil.Clamp(value, min, max);
2828
Assert.Equal(expected, result, 5); // precision tolerance
2929
}
3030

@@ -34,7 +34,7 @@ public void Clamp_Double_Works(double value, double min, double max, double expe
3434
[InlineData(15L, 1L, 10L, 10L)]
3535
public void Clamp_Long_Works(long value, long min, long max, long expected)
3636
{
37-
double result = MathHelper.Clamp(value, min, max);
37+
double result = MathUtil.Clamp(value, min, max);
3838
Assert.Equal(expected, result);
3939
}
4040

@@ -44,7 +44,7 @@ public void Clamp_Long_Works(long value, long min, long max, long expected)
4444
[InlineData(15f, 1f, 10f, 10f)]
4545
public void Clamp_Float_Works(float value, float min, float max, float expected)
4646
{
47-
double result = MathHelper.Clamp(value, min, max);
47+
double result = MathUtil.Clamp(value, min, max);
4848
Assert.Equal(expected, result, 5);
4949
}
5050
#endif

src/TestAddIn/TestAddIn.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net10.0</TargetFramework>
4+
<TargetFrameworks>net8.0;net472</TargetFrameworks>
55
<RootNamespace>MyAddIn</RootNamespace>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

0 commit comments

Comments
 (0)