min.praat 1021 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #! Praat test script min.praat
  2. # Paul Boersma, July 26, 2003
  3. echo min
  4. assert min (5, 6) = 5
  5. assert min (-7.8) = -7.8
  6. assert min (3, 4, 5, 7, 2, 10) = 2
  7. assert min (3, 4, 5, 7, 12, 10) = 3
  8. assert min (3, 4, 5, 7, 12, 1) = 1
  9. assert imin (5, 6) = 1
  10. assert imin (-7.8) = 1
  11. assert imin (3, 4, 5, 7, 2, 10) = 5
  12. assert imin (3, 4, 5, 7, 12, 10) = 1
  13. assert imin (3, 4, 5, 7, 12, 1) = 6
  14. assert max (5, 6) = 6
  15. assert max (-7.8) = -7.8
  16. assert max (3, 4, 5, 7, 2, 10) = 10
  17. assert max (3, 4, 5, 7, 12, 10) = 12
  18. assert max (13, 4, 5, 7, 12, 10) = 13
  19. assert imax (5, 6) = 2
  20. assert imax (-7.8) = 1
  21. assert imax (3, 4, 5, 7, 2, 10) = 6
  22. assert imax (3, 4, 5, 7, 12, 10) = 5
  23. assert imax (13, 4, 5, 7, 12, 10) = 1
  24. assert min (undefined, 3) = undefined
  25. assert imin (undefined, 3) = undefined
  26. assert max (undefined, 3) = undefined
  27. assert imax (undefined, 3) = undefined
  28. assert min (3, undefined) = undefined
  29. assert imin (3, undefined) = undefined
  30. assert max (3, undefined) = undefined
  31. assert imax (3, undefined) = undefined
  32. printline OK