No Description

test_sortAlgo.py 417B

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