Skip to content

Commit 26df001

Browse files
Fix build issues with net9 (#644)
1 parent be63d76 commit 26df001

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Tests/SuperLinq.Test/ReturnTest.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Test;
1+
namespace Test;
22

33
public class ReturnTest
44
{
@@ -91,6 +91,7 @@ public void TestIndexOfAnItemNotContainedIsNegativeOne()
9191
}
9292

9393
#pragma warning disable IDE0200 // Remove unnecessary lambda expression
94+
#pragma warning disable IDE0300 // Collection initialization can be simplified
9495
public static IEnumerable<object[]> UnsupportedActions() =>
9596
new Action[][]
9697
{
@@ -101,6 +102,7 @@ public static IEnumerable<object[]> UnsupportedActions() =>
101102
[() => SomeSingleton.List.Insert(0, new object()),],
102103
[() => SomeSingleton.List[0] = new object(),],
103104
};
105+
#pragma warning restore IDE0300 // Collection initialization can be simplified
104106
#pragma warning restore IDE0200 // Remove unnecessary lambda expression
105107

106108
[Theory, MemberData(nameof(UnsupportedActions))]

Tests/SuperLinq.Test/UpdatablePriorityQueueTest.cs

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// copied from https://github.com/dotnet/runtime/tree/main/src/libraries/System.Collections/tests/Generic/PriorityQueue
44
// and further edited
@@ -439,14 +439,13 @@ public void UpdatablePriorityQueue_Generic_EnqueueRange_ChangesPriority()
439439
queue.EnqueueRange(["alpha", "bravo", "charlie", "delta", "echo",], 30);
440440

441441
queue.EnqueueRange(
442-
new[]
443-
{
442+
[
444443
("alpha", 50),
445444
("bravo", 40),
446445
("charlie", 30),
447446
("delta", 20),
448447
("echo", 10),
449-
});
448+
]);
450449

451450
queue.UnorderedItems.AssertCollectionEqual(
452451
("alpha", 50),
@@ -494,14 +493,13 @@ public void UpdatablePriorityQueue_Generic_EnqueueRangeMinimum_UsesLowestPriorit
494493
queue.EnqueueRange(["alpha", "bravo", "charlie", "delta", "echo",], 30);
495494

496495
queue.EnqueueRangeMinimum(
497-
new[]
498-
{
496+
[
499497
("alpha", 50),
500498
("bravo", 40),
501499
("charlie", 30),
502500
("delta", 20),
503501
("echo", 10),
504-
});
502+
]);
505503

506504
queue.UnorderedItems.AssertCollectionEqual(
507505
("alpha", 30),

0 commit comments

Comments
 (0)