|
1 | 1 | #[test]
|
2 |
| -fn test_1() { |
3 |
| - assert_eq!("1", raindrops::raindrops(1)); |
| 2 | +fn test_the_sound_for_1_is_1() { |
| 3 | + let input = 1; |
| 4 | + let output = raindrops::raindrops(input); |
| 5 | + let expected = "1"; |
| 6 | + assert_eq!(output, expected); |
4 | 7 | }
|
5 | 8 |
|
6 | 9 | #[test]
|
7 | 10 | #[ignore]
|
8 |
| -fn test_3() { |
9 |
| - assert_eq!("Pling", raindrops::raindrops(3)); |
| 11 | +fn test_the_sound_for_3_is_pling() { |
| 12 | + let input = 3; |
| 13 | + let output = raindrops::raindrops(input); |
| 14 | + let expected = "Pling"; |
| 15 | + assert_eq!(output, expected); |
10 | 16 | }
|
11 | 17 |
|
12 | 18 | #[test]
|
13 | 19 | #[ignore]
|
14 |
| -fn test_5() { |
15 |
| - assert_eq!("Plang", raindrops::raindrops(5)); |
| 20 | +fn test_the_sound_for_5_is_plang() { |
| 21 | + let input = 5; |
| 22 | + let output = raindrops::raindrops(input); |
| 23 | + let expected = "Plang"; |
| 24 | + assert_eq!(output, expected); |
16 | 25 | }
|
17 | 26 |
|
18 | 27 | #[test]
|
19 | 28 | #[ignore]
|
20 |
| -fn test_7() { |
21 |
| - assert_eq!("Plong", raindrops::raindrops(7)); |
| 29 | +fn test_the_sound_for_7_is_plong() { |
| 30 | + let input = 7; |
| 31 | + let output = raindrops::raindrops(input); |
| 32 | + let expected = "Plong"; |
| 33 | + assert_eq!(output, expected); |
22 | 34 | }
|
23 | 35 |
|
24 | 36 | #[test]
|
25 | 37 | #[ignore]
|
26 |
| -fn test_6() { |
27 |
| - assert_eq!("Pling", raindrops::raindrops(6)); |
| 38 | +fn test_the_sound_for_6_is_pling_as_it_has_a_factor_3() { |
| 39 | + let input = 6; |
| 40 | + let output = raindrops::raindrops(input); |
| 41 | + let expected = "Pling"; |
| 42 | + assert_eq!(output, expected); |
28 | 43 | }
|
29 | 44 |
|
30 | 45 | #[test]
|
31 | 46 | #[ignore]
|
32 |
| -fn test_8() { |
33 |
| - assert_eq!("8", raindrops::raindrops(8)); |
| 47 | +fn test_2_to_the_power_3_does_not_make_a_raindrop_sound_as_3_is_the_exponent_not_the_base() { |
| 48 | + let input = 8; |
| 49 | + let output = raindrops::raindrops(input); |
| 50 | + let expected = "8"; |
| 51 | + assert_eq!(output, expected); |
34 | 52 | }
|
35 | 53 |
|
36 | 54 | #[test]
|
37 | 55 | #[ignore]
|
38 |
| -fn test_9() { |
39 |
| - assert_eq!("Pling", raindrops::raindrops(9)); |
| 56 | +fn test_the_sound_for_9_is_pling_as_it_has_a_factor_3() { |
| 57 | + let input = 9; |
| 58 | + let output = raindrops::raindrops(input); |
| 59 | + let expected = "Pling"; |
| 60 | + assert_eq!(output, expected); |
40 | 61 | }
|
41 | 62 |
|
42 | 63 | #[test]
|
43 | 64 | #[ignore]
|
44 |
| -fn test_10() { |
45 |
| - assert_eq!("Plang", raindrops::raindrops(10)); |
| 65 | +fn test_the_sound_for_10_is_plang_as_it_has_a_factor_5() { |
| 66 | + let input = 10; |
| 67 | + let output = raindrops::raindrops(input); |
| 68 | + let expected = "Plang"; |
| 69 | + assert_eq!(output, expected); |
46 | 70 | }
|
47 | 71 |
|
48 | 72 | #[test]
|
49 | 73 | #[ignore]
|
50 |
| -fn test_14() { |
51 |
| - assert_eq!("Plong", raindrops::raindrops(14)); |
| 74 | +fn test_the_sound_for_14_is_plong_as_it_has_a_factor_of_7() { |
| 75 | + let input = 14; |
| 76 | + let output = raindrops::raindrops(input); |
| 77 | + let expected = "Plong"; |
| 78 | + assert_eq!(output, expected); |
52 | 79 | }
|
53 | 80 |
|
54 | 81 | #[test]
|
55 | 82 | #[ignore]
|
56 |
| -fn test_15() { |
57 |
| - assert_eq!("PlingPlang", raindrops::raindrops(15)); |
| 83 | +fn test_the_sound_for_15_is_plingplang_as_it_has_factors_3_and_5() { |
| 84 | + let input = 15; |
| 85 | + let output = raindrops::raindrops(input); |
| 86 | + let expected = "PlingPlang"; |
| 87 | + assert_eq!(output, expected); |
58 | 88 | }
|
59 | 89 |
|
60 | 90 | #[test]
|
61 | 91 | #[ignore]
|
62 |
| -fn test_21() { |
63 |
| - assert_eq!("PlingPlong", raindrops::raindrops(21)); |
| 92 | +fn test_the_sound_for_21_is_plingplong_as_it_has_factors_3_and_7() { |
| 93 | + let input = 21; |
| 94 | + let output = raindrops::raindrops(input); |
| 95 | + let expected = "PlingPlong"; |
| 96 | + assert_eq!(output, expected); |
64 | 97 | }
|
65 | 98 |
|
66 | 99 | #[test]
|
67 | 100 | #[ignore]
|
68 |
| -fn test_25() { |
69 |
| - assert_eq!("Plang", raindrops::raindrops(25)); |
| 101 | +fn test_the_sound_for_25_is_plang_as_it_has_a_factor_5() { |
| 102 | + let input = 25; |
| 103 | + let output = raindrops::raindrops(input); |
| 104 | + let expected = "Plang"; |
| 105 | + assert_eq!(output, expected); |
70 | 106 | }
|
71 | 107 |
|
72 | 108 | #[test]
|
73 | 109 | #[ignore]
|
74 |
| -fn test_27() { |
75 |
| - assert_eq!("Pling", raindrops::raindrops(27)); |
| 110 | +fn test_the_sound_for_27_is_pling_as_it_has_a_factor_3() { |
| 111 | + let input = 27; |
| 112 | + let output = raindrops::raindrops(input); |
| 113 | + let expected = "Pling"; |
| 114 | + assert_eq!(output, expected); |
76 | 115 | }
|
77 | 116 |
|
78 | 117 | #[test]
|
79 | 118 | #[ignore]
|
80 |
| -fn test_35() { |
81 |
| - assert_eq!("PlangPlong", raindrops::raindrops(35)); |
| 119 | +fn test_the_sound_for_35_is_plangplong_as_it_has_factors_5_and_7() { |
| 120 | + let input = 35; |
| 121 | + let output = raindrops::raindrops(input); |
| 122 | + let expected = "PlangPlong"; |
| 123 | + assert_eq!(output, expected); |
82 | 124 | }
|
83 | 125 |
|
84 | 126 | #[test]
|
85 | 127 | #[ignore]
|
86 |
| -fn test_49() { |
87 |
| - assert_eq!("Plong", raindrops::raindrops(49)); |
| 128 | +fn test_the_sound_for_49_is_plong_as_it_has_a_factor_7() { |
| 129 | + let input = 49; |
| 130 | + let output = raindrops::raindrops(input); |
| 131 | + let expected = "Plong"; |
| 132 | + assert_eq!(output, expected); |
88 | 133 | }
|
89 | 134 |
|
90 | 135 | #[test]
|
91 | 136 | #[ignore]
|
92 |
| -fn test_52() { |
93 |
| - assert_eq!("52", raindrops::raindrops(52)); |
| 137 | +fn test_the_sound_for_52_is_52() { |
| 138 | + let input = 52; |
| 139 | + let output = raindrops::raindrops(input); |
| 140 | + let expected = "52"; |
| 141 | + assert_eq!(output, expected); |
94 | 142 | }
|
95 | 143 |
|
96 | 144 | #[test]
|
97 | 145 | #[ignore]
|
98 |
| -fn test_105() { |
99 |
| - assert_eq!("PlingPlangPlong", raindrops::raindrops(105)); |
| 146 | +fn test_the_sound_for_105_is_plingplangplong_as_it_has_factors_3_5_and_7() { |
| 147 | + let input = 105; |
| 148 | + let output = raindrops::raindrops(input); |
| 149 | + let expected = "PlingPlangPlong"; |
| 150 | + assert_eq!(output, expected); |
100 | 151 | }
|
101 | 152 |
|
102 | 153 | #[test]
|
103 | 154 | #[ignore]
|
104 |
| -fn test_3125() { |
105 |
| - assert_eq!("Plang", raindrops::raindrops(3125)); |
106 |
| -} |
107 |
| - |
108 |
| -#[test] |
109 |
| -#[ignore] |
110 |
| -fn test_12121() { |
111 |
| - assert_eq!("12121", raindrops::raindrops(12_121)); |
| 155 | +fn test_the_sound_for_3125_is_plang_as_it_has_a_factor_5() { |
| 156 | + let input = 3125; |
| 157 | + let output = raindrops::raindrops(input); |
| 158 | + let expected = "Plang"; |
| 159 | + assert_eq!(output, expected); |
112 | 160 | }
|
0 commit comments