Skip to content

Commit ffb818a

Browse files
committed
Switch .NET Core 3.1 TFM in tests to .NET 7
1 parent 23245df commit ffb818a

File tree

24 files changed

+33
-35
lines changed

24 files changed

+33
-35
lines changed

tests/CommunityToolkit.Common.UnitTests/CommunityToolkit.Common.UnitTests.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-
<TargetFrameworks>net472;netcoreapp3.1;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;net6.0;net7.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

tests/CommunityToolkit.Diagnostics.UnitTests/CommunityToolkit.Diagnostics.UnitTests.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-
<TargetFrameworks>net472;netcoreapp3.1;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net472;net6.0;net7.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>

tests/CommunityToolkit.HighPerformance.UnitTests/Buffers/Test_StringPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public void Test_StringPool_GetOrAdd_ReadOnlySpan_Misc()
217217
Assert.AreEqual(nameof(helloworld), helloworld);
218218
Assert.AreEqual(nameof(dotnetCommunityToolkit), dotnetCommunityToolkit);
219219

220-
#if NETCOREAPP
220+
#if NET6_0_OR_GREATER
221221

222222
// .NET Framework reuses strings in a way that makes these tests fail.
223223
// The actual underlying APIs are still working as expected though.

tests/CommunityToolkit.HighPerformance.UnitTests/CommunityToolkit.HighPerformance.UnitTests.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-
<TargetFrameworks>net472;netcoreapp3.1;net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>net472;net6.0;net7.0</TargetFrameworks>
55
<EnablePreviewFeatures>true</EnablePreviewFeatures>
66
<NoWarn>$(NoWarn);CA2252</NoWarn>
77
</PropertyGroup>

tests/CommunityToolkit.HighPerformance.UnitTests/Enumerables/Test_ReadOnlyRefEnumerable{T}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
#if NETCOREAPP
5+
#if NET6_0_OR_GREATER
66

77
using System;
88
using System.Runtime.CompilerServices;
@@ -81,7 +81,7 @@ public void Test_ReadOnlyRefEnumerable_Indexer_ThrowsIndexOutOfRange()
8181
_ = Assert.ThrowsException<IndexOutOfRangeException>(() => ReadOnlyRefEnumerable<int>.DangerousCreate(in array[0], array.Length, 1)[array.Length]);
8282
}
8383

84-
#if NETCOREAPP3_1_OR_GREATER
84+
#if NET6_0_OR_GREATER
8585
[TestMethod]
8686
[DataRow(1, new[] { 1 })]
8787
[DataRow(1, new[] { 1, 2, 3, 4 })]

tests/CommunityToolkit.HighPerformance.UnitTests/Enumerables/Test_RefEnumerable{T}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
#if NETCOREAPP
5+
#if NET6_0_OR_GREATER
66

77
using System;
88
using System.Runtime.CompilerServices;
@@ -81,7 +81,7 @@ public void Test_RefEnumerable_Indexer_ThrowsIndexOutOfRange()
8181
_ = Assert.ThrowsException<IndexOutOfRangeException>(() => RefEnumerable<int>.DangerousCreate(ref array[0], array.Length, 1)[array.Length]);
8282
}
8383

84-
#if NETCOREAPP3_1_OR_GREATER
84+
#if NET6_0_OR_GREATER
8585
[TestMethod]
8686
[DataRow(1, new[] { 1 })]
8787
[DataRow(1, new[] { 1, 2, 3, 4 })]

tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_ArrayExtensions.2D.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ public void Test_ArrayExtensions_2D_GetColumn_Empty()
419419
_ = Assert.ThrowsException<ArgumentOutOfRangeException>(() => array.GetColumn(0).ToArray());
420420
}
421421

422-
#if NETCOREAPP3_1_OR_GREATER
422+
#if NET6_0_OR_GREATER
423423
[TestMethod]
424424
public void Test_ArrayExtensions_2D_AsSpan_Empty()
425425
{

tests/CommunityToolkit.HighPerformance.UnitTests/Extensions/Test_IBufferWriterExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System;
6-
#if NETCOREAPP
6+
#if NET6_0_OR_GREATER
77
using System.Buffers;
88
#endif
99
using System.IO;

tests/CommunityToolkit.HighPerformance.UnitTests/Helpers/Internals/Test_RuntimeHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
#if !NETCOREAPP3_1_OR_GREATER
5+
#if !NET6_0_OR_GREATER
66

77
using System;
88
using CommunityToolkit.HighPerformance.Helpers.Internals;

tests/CommunityToolkit.HighPerformance.UnitTests/Helpers/Test_HashCode{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void Test_HashCodeOfT_VectorUnsupportedTypes_TestRepeat()
5555
TestForType<char>();
5656
}
5757

58-
#if NETCOREAPP3_1_OR_GREATER
58+
#if NET6_0_OR_GREATER
5959
[TestMethod]
6060
public void Test_HashCodeOfT_ManagedType_TestRepeat()
6161
{

0 commit comments

Comments
 (0)