Skip to content

Commit bc8db1a

Browse files
committed
Update test projects
1 parent 277d232 commit bc8db1a

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

tests/PolySharp.NuGet/PolySharp.NuGet.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net48;net481;netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net472;net48;net481;netstandard2.0;netstandard2.1;net8.0;net9.0</TargetFrameworks>
55
<RestoreSources>
66
https://api.nuget.org/v3/index.json;
77
..\..\artifacts;
@@ -11,7 +11,7 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="PolySharp" Version="$(PackageVersion)" />
14-
<PackageReference Include="System.Memory" Version="4.5.5" Condition="'$(TargetFramework)' == 'net472' OR '$(TargetFramework)' == 'net48' OR '$(TargetFramework)' == 'net481' OR '$(TargetFramework)' == 'netstandard2.0'" />
14+
<PackageReference Include="System.Memory" Version="4.5.5" Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

tests/PolySharp.Tests/PolySharp.Tests.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net48;netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
4+
<TargetFrameworks>net472;net48;net481;netstandard2.0;netstandard2.1;net8.0;net9.0</TargetFrameworks>
55
<PolySharpIncludeRuntimeSupportedAttributes>true</PolySharpIncludeRuntimeSupportedAttributes>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<CompilerVisibleProperty Include="PolySharpIncludeRuntimeSupportedAttributes" />
1010
</ItemGroup>
1111

12-
<ItemGroup Condition="'$(TargetFramework)' == 'net472' OR '$(TargetFramework)' == 'net48' OR '$(TargetFramework)' == 'netstandard2.0'">
12+
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
1313
<PackageReference Include="System.Memory" Version="4.5.5" />
1414
</ItemGroup>
1515

tests/PolySharp.TypeForwards.Tests/PolySharp.TypeForwards.Tests.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net48;net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net472;net48;net481;net8.0;net9.0</TargetFrameworks>
55
<NoWarn>$(NoWarn);CS1591</NoWarn>
66
<PolySharpUsePublicAccessibilityForGeneratedTypes>true</PolySharpUsePublicAccessibilityForGeneratedTypes>
77
</PropertyGroup>
@@ -16,7 +16,7 @@
1616
<PackageReference Include="MSTest.TestFramework" Version="3.6.2" />
1717
</ItemGroup>
1818

19-
<ItemGroup Condition="'$(TargetFramework)' == 'net472' OR '$(TargetFramework)' == 'net48'">
19+
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
2020
<PackageReference Include="System.Memory" Version="4.5.5" />
2121
</ItemGroup>
2222

tests/PolySharp.TypeForwards.Tests/TypeForwardTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Linq;
33
using System.Reflection;
4-
#if NET6_0_OR_GREATER
4+
#if NET8_0_OR_GREATER
55
using System.Runtime.CompilerServices;
66
#endif
77
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -14,7 +14,7 @@ public class TypeForwardTests
1414
[TestMethod]
1515
public void Index_IsForwarded()
1616
{
17-
#if NET6_0_OR_GREATER
17+
#if NET8_0_OR_GREATER
1818
Assert.AreEqual(typeof(object).Assembly, typeof(Index).Assembly);
1919
Assert.AreEqual(typeof(Index).Assembly.GetName().Name!, typeof(TypeForwardTests).Assembly.GetType("System.Index")!.Assembly.GetName().Name);
2020
#else
@@ -25,7 +25,7 @@ public void Index_IsForwarded()
2525
[TestMethod]
2626
public void Range_IsForwarded()
2727
{
28-
#if NET6_0_OR_GREATER
28+
#if NET8_0_OR_GREATER
2929
Assert.AreEqual(typeof(object).Assembly, typeof(Range).Assembly);
3030
Assert.AreEqual(typeof(Range).Assembly.GetName().Name!, typeof(TypeForwardTests).Assembly.GetType("System.Range")!.Assembly.GetName().Name);
3131
#else
@@ -45,7 +45,7 @@ public void IsExternalInit_IsForwarded()
4545
Assert.AreEqual(1, returnRequiredModifiers.Length); // There is a single modreq
4646
Assert.AreEqual("System.Runtime.CompilerServices.IsExternalInit", returnRequiredModifiers[0].FullName); // The modreq is IsExternalInit
4747

48-
#if NET6_0_OR_GREATER
48+
#if NET8_0_OR_GREATER
4949
Assert.AreEqual(typeof(object).Assembly, typeof(IsExternalInit).Assembly); // The IsExternalInit should be the one from the BCL
5050

5151
string isExternalInitAssemblyName = typeof(IsExternalInit).Assembly.GetName().Name!;

0 commit comments

Comments
 (0)