diff --git a/tests/Sorting/SortTest.php b/tests/Sorting/SortTest.php index 4c68b2e..9ee7d08 100644 --- a/tests/Sorting/SortTest.php +++ b/tests/Sorting/SortTest.php @@ -111,6 +111,12 @@ public function testTimSort() { $arr = [1]; $result = $timSort->sort($arr); $this->assertTrue($result === [1]); + + $expected = range(1, 42, 1); + $arr = $expected; + shuffle($arr); + $result = $timSort->sort($arr); + $this->assertTrue($result === $expected, 'unexpected result: ' . implode(', ', $result)); } public function testQuickSort() { @@ -147,4 +153,4 @@ public function testRadixSort() { $result = $radixSort->sort([9]); $this->assertTrue($result === [9]); } -} \ No newline at end of file +}