Skip to content

Commit adc73fb

Browse files
Expand PriorityQueue test coverage (#48420)
* make comparer field readonly * abstract IComparer in PriorityQueue generic tests does minor refactorings and adds new tests * add PriorityQueue property tests * address feedback * add seed for deterministic runs * apply var fixes in property tests * replace FsCheck properties with theories
1 parent e270708 commit adc73fb

File tree

6 files changed

+477
-213
lines changed

6 files changed

+477
-213
lines changed

src/libraries/System.Collections/src/System/Collections/Generic/PriorityQueue.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class PriorityQueue<TElement, TPriority>
2323
/// <summary>
2424
/// Custom comparer used to order the heap.
2525
/// </summary>
26-
private IComparer<TPriority>? _comparer;
26+
private readonly IComparer<TPriority>? _comparer;
2727

2828
/// <summary>
2929
/// Lazily-initialized collection used to expose the contents of the queue.

0 commit comments

Comments
 (0)