|
1 | 1 | {
|
2 | 2 | "exercise": "all-your-base",
|
3 |
| - "version": "1.1.0", |
| 3 | + "version": "2.0.0", |
4 | 4 | "comments": [
|
5 | 5 | "It's up to each track do decide:",
|
6 | 6 | "",
|
|
124 | 124 | "input_base": 1,
|
125 | 125 | "input_digits": [],
|
126 | 126 | "output_base": 10,
|
127 |
| - "expected": null |
| 127 | + "expected": {"error": "input base must be >= 2"} |
128 | 128 | },
|
129 | 129 | {
|
130 | 130 | "description": "first base is zero",
|
131 | 131 | "property": "rebase",
|
132 | 132 | "input_base": 0,
|
133 | 133 | "input_digits": [],
|
134 | 134 | "output_base": 10,
|
135 |
| - "expected": null |
| 135 | + "expected": {"error": "input base must be >= 2"} |
136 | 136 | },
|
137 | 137 | {
|
138 | 138 | "description": "first base is negative",
|
139 | 139 | "property": "rebase",
|
140 | 140 | "input_base": -2,
|
141 | 141 | "input_digits": [1],
|
142 | 142 | "output_base": 10,
|
143 |
| - "expected": null |
| 143 | + "expected": {"error": "input base must be >= 2"} |
144 | 144 | },
|
145 | 145 | {
|
146 | 146 | "description": "negative digit",
|
147 | 147 | "property": "rebase",
|
148 | 148 | "input_base": 2,
|
149 | 149 | "input_digits": [1, -1, 1, 0, 1, 0],
|
150 | 150 | "output_base": 10,
|
151 |
| - "expected": null |
| 151 | + "expected": {"error": "all digits must satisfy 0 <= d < input base"} |
152 | 152 | },
|
153 | 153 | {
|
154 | 154 | "description": "invalid positive digit",
|
155 | 155 | "property": "rebase",
|
156 | 156 | "input_base": 2,
|
157 | 157 | "input_digits": [1, 2, 1, 0, 1, 0],
|
158 | 158 | "output_base": 10,
|
159 |
| - "expected": null |
| 159 | + "expected": {"error": "all digits must satisfy 0 <= d < input base"} |
160 | 160 | },
|
161 | 161 | {
|
162 | 162 | "description": "second base is one",
|
163 | 163 | "property": "rebase",
|
164 | 164 | "input_base": 2,
|
165 | 165 | "input_digits": [1, 0, 1, 0, 1, 0],
|
166 | 166 | "output_base": 1,
|
167 |
| - "expected": null |
| 167 | + "expected": {"error": "output base must be >= 2"} |
168 | 168 | },
|
169 | 169 | {
|
170 | 170 | "description": "second base is zero",
|
171 | 171 | "property": "rebase",
|
172 | 172 | "input_base": 10,
|
173 | 173 | "input_digits": [7],
|
174 | 174 | "output_base": 0,
|
175 |
| - "expected": null |
| 175 | + "expected": {"error": "output base must be >= 2"} |
176 | 176 | },
|
177 | 177 | {
|
178 | 178 | "description": "second base is negative",
|
179 | 179 | "property": "rebase",
|
180 | 180 | "input_base": 2,
|
181 | 181 | "input_digits": [1],
|
182 | 182 | "output_base": -7,
|
183 |
| - "expected": null |
| 183 | + "expected": {"error": "output base must be >= 2"} |
184 | 184 | },
|
185 | 185 | {
|
186 | 186 | "description": "both bases are negative",
|
187 | 187 | "property": "rebase",
|
188 | 188 | "input_base": -2,
|
189 | 189 | "input_digits": [1],
|
190 | 190 | "output_base": -7,
|
191 |
| - "expected": null |
| 191 | + "expected": {"error": "input base must be >= 2"} |
192 | 192 | }
|
193 | 193 | ]
|
194 | 194 | }
|
0 commit comments