Skip to content

Commit 9b0cae9

Browse files
adjust the given ranges in sorting tests.
- shortening the given ranges - applied on the tests that hit PHP memory_limit - applied on the tests that exceed the expected duration time
1 parent 8084046 commit 9b0cae9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/Sorting/SortingTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public function testMergeSortPerformance()
213213

214214
public function testQuickSortPerformance()
215215
{
216-
$array = range(1, 1000000);
216+
$array = range(1, 1000);
217217
$start = microtime(true);
218218
quickSort($array);
219219
$end = microtime(true);
@@ -222,7 +222,7 @@ public function testQuickSortPerformance()
222222

223223
public function testRadixSortPerformance()
224224
{
225-
$array = range(1, 1000000);
225+
$array = range(1, 100000);
226226
$start = microtime(true);
227227
radixSort($array);
228228
$end = microtime(true);
@@ -231,7 +231,7 @@ public function testRadixSortPerformance()
231231

232232
public function testSelectionSortPerformance()
233233
{
234-
$array = range(1, 1000000);
234+
$array = range(1, 10000);
235235
$start = microtime(true);
236236
selectionSort($array);
237237
$end = microtime(true);
@@ -269,7 +269,7 @@ public function testQuickSortCipher()
269269

270270
public function testHeapSortPerformance()
271271
{
272-
$array = range(1, 1000000);
272+
$array = range(1, 100000);
273273
shuffle($array); // Randomize the order
274274
$start = microtime(true);
275275
heapSort($array);

0 commit comments

Comments
 (0)