Test output for numspell [ok]
Testing time: 1s
/home/mario/local/chicken-4.8.0.3/bin/csi -script run.scm < /dev/null ;;; BEGIN "numspell.scm" TESTS ;; 1. (number->english 0) ;; ==> "zero" ;; Passed. ;; 2. (number->english 1) ;; ==> "one" ;; Passed. ;; 3. (number->english 2) ;; ==> "two" ;; Passed. ;; 4. (number->english 3) ;; ==> "three" ;; Passed. ;; 5. (number->english 4) ;; ==> "four" ;; Passed. ;; 6. (number->english 5) ;; ==> "five" ;; Passed. ;; 7. (number->english 6) ;; ==> "six" ;; Passed. ;; 8. (number->english 7) ;; ==> "seven" ;; Passed. ;; 9. (number->english 8) ;; ==> "eight" ;; Passed. ;; 10. (number->english 9) ;; ==> "nine" ;; Passed. ;; 11. (number->english 10) ;; ==> "ten" ;; Passed. ;; 12. (number->english 11) ;; ==> "eleven" ;; Passed. ;; 13. (number->english 12) ;; ==> "twelve" ;; Passed. ;; 14. (number->english 13) ;; ==> "thirteen" ;; Passed. ;; 15. (number->english 14) ;; ==> "fourteen" ;; Passed. ;; 16. (number->english 15) ;; ==> "fifteen" ;; Passed. ;; 17. (number->english 16) ;; ==> "sixteen" ;; Passed. ;; 18. (number->english 17) ;; ==> "seventeen" ;; Passed. ;; 19. (number->english 18) ;; ==> "eighteen" ;; Passed. ;; 20. (number->english 19) ;; ==> "nineteen" ;; Passed. ;; 21. (number->english 20) ;; ==> "twenty" ;; Passed. ;; 22. (number->english 21) ;; ==> "twenty-one" ;; Passed. ;; 23. (number->english 30) ;; ==> "thirty" ;; Passed. ;; 24. (number->english 40) ;; ==> "forty" ;; Passed. ;; 25. (number->english 50) ;; ==> "fifty" ;; Passed. ;; 26. (number->english 60) ;; ==> "sixty" ;; Passed. ;; 27. (number->english 70) ;; ==> "seventy" ;; Passed. ;; 28. (number->english 80) ;; ==> "eighty" ;; Passed. ;; 29. (number->english 90) ;; ==> "ninety" ;; Passed. ;; 30. (number->english 100) ;; ==> "one hundred" ;; Passed. ;; 31. (number->english 102) ;; ==> "one hundred two" ;; Passed. ;; 32. (number->english 1002) ;; ==> "one thousand two" ;; Passed. ;; 33. (number->english 10002) ;; ==> "ten thousand two" ;; Passed. ;; 34. (number->english 100002) ;; ==> "one hundred thousand two" ;; Passed. ;; 35. (number->english 1000002) ;; ==> "one million two" ;; Passed. ;; 36. (number->english 10000002) ;; ==> "ten million two" ;; Passed. ;; 37. (number->english 100000002) ;; ==> "one hundred million two" ;; Passed. ;; 38. (number->english 1000000002) ;; ==> "one billion two" ;; Passed. ;; 39. (number->english 1000000000002) ;; ==> "one trillion two" ;; Passed. ;; 40. (number->english 100020003000) ;; ==> "one hundred billion twenty million three thousand" ;; Passed. ;; 41. (number->english 123) ;; ==> "one hundred twenty-three" ;; Passed. ;; 42. (number->english 1234) ;; ==> "one thousand two hundred thirty-four" ;; Passed. ;; 43. (number->english 12345) ;; ==> "twelve thousand three hundred forty-five" ;; Passed. ;; 44. (number->english 123456) ;; ==> "one hundred twenty-three thousand four hundred fifty-six" ;; Passed. ;; 45. (number->english 1234567) ;; ==> "one million two hundred thirty-four thousand five hundred sixty-seven" ;; Passed. ;; 46. (number->english 123456789012345678901234567890) ;; ==> "one hundred twenty-three octillion four hundred fifty-six septillion seven hundred eighty-nine sextillion twelve quintillion three hundred forty-five quadrillion six hundred seventy-eight trillion nine hundred one billion two hundred thirty-four million five hundred sixty-seven thousand eight hundred ninety" ;; Passed. ;; 47. (number->english 1/3) ;; ==> "one over three" ;; Passed. ;; 48. (number->english 123.0123) ;; ==> "one hundred twenty-three point zero one two three" ;; Passed. ;; DEFINE: (define f (lambda (n) (let ((x (expt 10 n))) (list (number->short-scale-english x) (number->long-scale-english x))))) ;; 49. (f 3) ;; ==> ("one thousand" "one thousand") ;; Passed. ;; 50. (f 6) ;; ==> ("one million" "one million") ;; Passed. ;; 51. (f 9) ;; ==> ("one billion" "one thousand million") ;; Passed. ;; 52. (f 12) ;; ==> ("one trillion" "one billion") ;; Passed. ;; 53. (f 15) ;; ==> ("one quadrillion" "one thousand billion") ;; Passed. ;; 54. (f 18) ;; ==> ("one quintillion" "one trillion") ;; Passed. ;; 55. (number->english -1) ;; ==> "negative one" ;; Passed. ;;; END "numspell.scm" TESTS: PASSED ;;; (Total: 55 Passed: 55 Failed: 0)