blob: a250532e862ea0a7c9aa4cb4f3e421b2d51cb0da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
;;; roman-numerals-test.el --- Tests for roman-numerals (exercism)
;;; Commentary:
;;; Code:
(load-file "roman-numerals.el")
(ert-deftest to-roman-1 ()
(should (equal (to-roman 1) "I")))
(ert-deftest to-roman-2 ()
(should (equal (to-roman 2) "II")))
(ert-deftest to-roman-3 ()
(should (equal (to-roman 3) "III")))
(ert-deftest to-roman-4 ()
(should (equal (to-roman 4) "IV")))
(ert-deftest to-roman-5 ()
(should (equal (to-roman 5) "V")))
(ert-deftest to-roman-6 ()
(should (equal (to-roman 6) "VI")))
(ert-deftest to-roman-9 ()
(should (equal (to-roman 9) "IX")))
(ert-deftest to-roman-27 ()
(should (equal (to-roman 27) "XXVII")))
(ert-deftest to-roman-48 ()
(should (equal (to-roman 48) "XLVIII")))
(ert-deftest to-roman-59 ()
(should (equal (to-roman 59) "LIX")))
(ert-deftest to-roman-93 ()
(should (equal (to-roman 93) "XCIII")))
(ert-deftest to-roman-141 ()
(should (equal (to-roman 141) "CXLI")))
(ert-deftest to-roman-163 ()
(should (equal (to-roman 163) "CLXIII")))
(ert-deftest to-roman-402 ()
(should (equal (to-roman 402) "CDII")))
(ert-deftest to-roman-575 ()
(should (equal (to-roman 575) "DLXXV")))
(ert-deftest to-roman-911 ()
(should (equal (to-roman 911) "CMXI")))
(ert-deftest to-roman-1024 ()
(should (equal (to-roman 1024) "MXXIV")))
(ert-deftest to-roman-3000 ()
(should (equal (to-roman 3000) "MMM")))
(provide 'roman-numerals)
;;; roman-numerals-test.el ends here
|