|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+extern crate task2;
|
|
|
2
|
+
|
|
|
3
|
+use task2::*;
|
|
|
4
|
+
|
|
|
5
|
+#[test]
|
|
|
6
|
+fn test_one() {
|
|
|
7
|
+ assert_eq!("I", Roman::from(1));
|
|
|
8
|
+}
|
|
|
9
|
+
|
|
|
10
|
+#[test]
|
|
|
11
|
+fn test_two() {
|
|
|
12
|
+ assert_eq!("II", Roman::from(2));
|
|
|
13
|
+}
|
|
|
14
|
+
|
|
|
15
|
+#[test]
|
|
|
16
|
+fn test_three() {
|
|
|
17
|
+ assert_eq!("III", Roman::from(3));
|
|
|
18
|
+}
|
|
|
19
|
+
|
|
|
20
|
+#[test]
|
|
|
21
|
+fn test_four() {
|
|
|
22
|
+ assert_eq!("IV", Roman::from(4));
|
|
|
23
|
+}
|
|
|
24
|
+
|
|
|
25
|
+#[test]
|
|
|
26
|
+fn test_five() {
|
|
|
27
|
+ assert_eq!("V", Roman::from(5));
|
|
|
28
|
+}
|
|
|
29
|
+
|
|
|
30
|
+#[test]
|
|
|
31
|
+fn test_six() {
|
|
|
32
|
+ assert_eq!("VI", Roman::from(6));
|
|
|
33
|
+}
|
|
|
34
|
+
|
|
|
35
|
+#[test]
|
|
|
36
|
+fn test_nine() {
|
|
|
37
|
+ assert_eq!("IX", Roman::from(9));
|
|
|
38
|
+}
|
|
|
39
|
+
|
|
|
40
|
+#[test]
|
|
|
41
|
+fn test_twenty_seven() {
|
|
|
42
|
+ assert_eq!("XXVII", Roman::from(27));
|
|
|
43
|
+}
|
|
|
44
|
+
|
|
|
45
|
+#[test]
|
|
|
46
|
+fn test_forty_eight() {
|
|
|
47
|
+ assert_eq!("XLVIII", Roman::from(48));
|
|
|
48
|
+}
|
|
|
49
|
+
|
|
|
50
|
+#[test]
|
|
|
51
|
+fn test_fifty_nine() {
|
|
|
52
|
+ assert_eq!("LIX", Roman::from(59));
|
|
|
53
|
+}
|
|
|
54
|
+
|
|
|
55
|
+#[test]
|
|
|
56
|
+fn test_ninety_three() {
|
|
|
57
|
+ assert_eq!("XCIII", Roman::from(93));
|
|
|
58
|
+}
|
|
|
59
|
+
|
|
|
60
|
+#[test]
|
|
|
61
|
+fn test_141() {
|
|
|
62
|
+ assert_eq!("CXLI", Roman::from(141));
|
|
|
63
|
+}
|
|
|
64
|
+
|
|
|
65
|
+#[test]
|
|
|
66
|
+fn test_163() {
|
|
|
67
|
+ assert_eq!("CLXIII", Roman::from(163));
|
|
|
68
|
+}
|
|
|
69
|
+
|
|
|
70
|
+#[test]
|
|
|
71
|
+fn test_402() {
|
|
|
72
|
+ assert_eq!("CDII", Roman::from(402));
|
|
|
73
|
+}
|
|
|
74
|
+
|
|
|
75
|
+#[test]
|
|
|
76
|
+fn test_575() {
|
|
|
77
|
+ assert_eq!("DLXXV", Roman::from(575));
|
|
|
78
|
+}
|
|
|
79
|
+
|
|
|
80
|
+#[test]
|
|
|
81
|
+fn test_911() {
|
|
|
82
|
+ assert_eq!("CMXI", Roman::from(911));
|
|
|
83
|
+}
|
|
|
84
|
+
|
|
|
85
|
+#[test]
|
|
|
86
|
+fn test_1024() {
|
|
|
87
|
+ assert_eq!("MXXIV", Roman::from(1024));
|
|
|
88
|
+}
|
|
|
89
|
+
|
|
|
90
|
+#[test]
|
|
|
91
|
+fn test_3000() {
|
|
|
92
|
+ assert_eq!("MMM", Roman::from(3000));
|
|
|
93
|
+}
|