Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
use and unsorted list
Browse files Browse the repository at this point in the history
  • Loading branch information
natebosch committed Nov 20, 2023
1 parent e3149c6 commit ed0f6d0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/algorithms_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,12 @@ void main() {
() {
// Regression test for https://github.com/dart-lang/collection/issues/317
final length = 1000; // Larger than _mergeSortLimit
// In order list, first half empties first during merge.
final list = List<int>.generate(length, (i) => i);
// Out of order list, with first half guaranteed to empty first during
// merge.
final list = [
for (var i = 0; i < length / 2; i++) -i,
for (var i = 0; i < length / 2; i++) i + length,
];
expect(() => mergeSort<num>(list), returnsNormally);
});
}
Expand Down

0 comments on commit ed0f6d0

Please sign in to comment.