|
| 1 | +;;; line-up-test.el --- Line Up (exercism) -*- lexical-binding: t; -*- |
| 2 | + |
| 3 | +;;; Commentary: |
| 4 | + |
| 5 | +;;; Code: |
| 6 | + |
| 7 | + |
| 8 | +(load-file "line-up.el") |
| 9 | +(declare-function ticket "line-up.el" (name number)) |
| 10 | + |
| 11 | + |
| 12 | +(ert-deftest format-smallest-non-exceptional-ordinal-numeral-4 () |
| 13 | + (should (string= "Gianna, you are the 4th customer we serve today. Thank you!" |
| 14 | + (ticket "Gianna" 4)))) |
| 15 | + |
| 16 | + |
| 17 | +(ert-deftest format-greatest-single-digit-non-exceptional-ordinal-numeral-9 () |
| 18 | + (should (string= "Maarten, you are the 9th customer we serve today. Thank you!" |
| 19 | + (ticket "Maarten" 9)))) |
| 20 | + |
| 21 | + |
| 22 | +(ert-deftest format-non-exceptional-ordinal-numeral-5 () |
| 23 | + (should (string= "Petronila, you are the 5th customer we serve today. Thank you!" |
| 24 | + (ticket "Petronila" 5)))) |
| 25 | + |
| 26 | + |
| 27 | +(ert-deftest format-non-exceptional-ordinal-numeral-6 () |
| 28 | + (should (string= "Attakullakulla, you are the 6th customer we serve today. Thank you!" |
| 29 | + (ticket "Attakullakulla" 6)))) |
| 30 | + |
| 31 | + |
| 32 | +(ert-deftest format-non-exceptional-ordinal-numeral-7 () |
| 33 | + (should (string= "Kate, you are the 7th customer we serve today. Thank you!" |
| 34 | + (ticket "Kate" 7)))) |
| 35 | + |
| 36 | + |
| 37 | +(ert-deftest format-non-exceptional-ordinal-numeral-8 () |
| 38 | + (should (string= "Maximiliano, you are the 8th customer we serve today. Thank you!" |
| 39 | + (ticket "Maximiliano" 8)))) |
| 40 | + |
| 41 | + |
| 42 | +(ert-deftest format-exceptional-ordinal-numeral-1 () |
| 43 | + (should (string= "Mary, you are the 1st customer we serve today. Thank you!" |
| 44 | + (ticket "Mary" 1)))) |
| 45 | + |
| 46 | + |
| 47 | +(ert-deftest format-exceptional-ordinal-numeral-2 () |
| 48 | + (should (string= "Haruto, you are the 2nd customer we serve today. Thank you!" |
| 49 | + (ticket "Haruto" 2)))) |
| 50 | + |
| 51 | + |
| 52 | +(ert-deftest format-exceptional-ordinal-numeral-3 () |
| 53 | + (should (string= "Henriette, you are the 3rd customer we serve today. Thank you!" |
| 54 | + (ticket "Henriette" 3)))) |
| 55 | + |
| 56 | + |
| 57 | +(ert-deftest format-smallest-two-digit-non-exceptional-ordinal-numeral-10 () |
| 58 | + (should (string= "Alvarez, you are the 10th customer we serve today. Thank you!" |
| 59 | + (ticket "Alvarez" 10)))) |
| 60 | + |
| 61 | + |
| 62 | +(ert-deftest format-non-exceptional-ordinal-numeral-11 () |
| 63 | + (should (string= "Jacqueline, you are the 11th customer we serve today. Thank you!" |
| 64 | + (ticket "Jacqueline" 11)))) |
| 65 | + |
| 66 | + |
| 67 | +(ert-deftest format-non-exceptional-ordinal-numeral-12 () |
| 68 | + (should (string= "Juan, you are the 12th customer we serve today. Thank you!" |
| 69 | + (ticket "Juan" 12)))) |
| 70 | + |
| 71 | + |
| 72 | +(ert-deftest format-non-exceptional-ordinal-numeral-13 () |
| 73 | + (should (string= "Patricia, you are the 13th customer we serve today. Thank you!" |
| 74 | + (ticket "Patricia" 13)))) |
| 75 | + |
| 76 | + |
| 77 | +(ert-deftest format-exceptional-ordinal-numeral-21 () |
| 78 | + (should (string= "Washi, you are the 21st customer we serve today. Thank you!" |
| 79 | + (ticket "Washi" 21)))) |
| 80 | + |
| 81 | + |
| 82 | +(ert-deftest format-exceptional-ordinal-numeral-62 () |
| 83 | + (should (string= "Nayra, you are the 62nd customer we serve today. Thank you!" |
| 84 | + (ticket "Nayra" 62)))) |
| 85 | + |
| 86 | + |
| 87 | +(ert-deftest format-exceptional-ordinal-numeral-100 () |
| 88 | + (should (string= "John, you are the 100th customer we serve today. Thank you!" |
| 89 | + (ticket "John" 100)))) |
| 90 | + |
| 91 | + |
| 92 | +(ert-deftest format-exceptional-ordinal-numeral-101 () |
| 93 | + (should (string= "Zeinab, you are the 101st customer we serve today. Thank you!" |
| 94 | + (ticket "Zeinab" 101)))) |
| 95 | + |
| 96 | + |
| 97 | +(ert-deftest format-non-exceptional-ordinal-numeral-112 () |
| 98 | + (should (string= "Knud, you are the 112th customer we serve today. Thank you!" |
| 99 | + (ticket "Knud" 112)))) |
| 100 | + |
| 101 | + |
| 102 | +(ert-deftest format-exceptional-ordinal-numeral-123 () |
| 103 | + (should (string= "Yma, you are the 123rd customer we serve today. Thank you!" |
| 104 | + (ticket "Yma" 123)))) |
| 105 | + |
| 106 | + |
| 107 | +(provide 'line-up-test) |
| 108 | +;;; line-up-test.el ends here |
0 commit comments