Browse Source

Pruebas para el algoritmo de Quicksort

root 2 years ago
parent
commit
1cf04b544e
1 changed files with 14 additions and 0 deletions
  1. 14
    0
      test_sortAlgo.py

+ 14
- 0
test_sortAlgo.py View File

1
+from email import utils
2
+
3
+
4
+from utils import qsortUtils
5
+from random import randint
6
+
7
+enteros = [0,7,3,1,4,5,2]
8
+negativos = [8,-1,3,2,-4,9]
9
+aleatoria =[randint(-49,50) for r in range(10)]
10
+
11
+print(qsortUtils.qSort(enteros,0,len(enteros)-1) == enteros.sort())
12
+print(qsortUtils.qSort(negativos,0,len(negativos)-1) == negativos.sort())
13
+print(qsortUtils.qSort(aleatoria,0,len(aleatoria)-1) == aleatoria.sort())
14
+