Skip to content

Commit 2ec5441

Browse files
authored
Reorder cases in roman-numerals canonical-data (#2185)
This reorders the cases in the roman-numerals exercise. The old order was sort-of increasing, but with some cases that were out of order, clumped at the end. This makes the order consistent, sorting numerically by the input value. This does not affect tracks that have implemented the exercise. It's purely a nice-to-have for tracks that are adding the exercise through the use of a generator. I used jq to visually verify the order: cat exercises/roman-numerals/canonical-data.json \ | jq -r .cases[].description Order before: 1 is I 2 is II 3 is III 4 is IV 5 is V 6 is VI 9 is IX 27 is XXVII 48 is XLVIII 49 is XLIX 59 is LIX 93 is XCIII 141 is CXLI 163 is CLXIII 402 is CDII 575 is DLXXV 911 is CMXI 1024 is MXXIV 3000 is MMM 16 is XVI 66 is LXVI 166 is CLXVI 666 is DCLXVI 1666 is MDCLXVI 3001 is MMMI 3999 is MMMCMXCIX Order after: 1 is I 2 is II 3 is III 4 is IV 5 is V 6 is VI 9 is IX 16 is XVI 27 is XXVII 48 is XLVIII 49 is XLIX 59 is LIX 66 is LXVI 93 is XCIII 141 is CXLI 163 is CLXIII 166 is CLXVI 402 is CDII 575 is DLXXV 666 is DCLXVI 911 is CMXI 1024 is MXXIV 1666 is MDCLXVI 3000 is MMM 3001 is MMMI 3999 is MMMCMXCIX
1 parent 51fcbc3 commit 2ec5441

File tree

1 file changed

+57
-57
lines changed

1 file changed

+57
-57
lines changed

exercises/roman-numerals/canonical-data.json

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@
6767
},
6868
"expected": "IX"
6969
},
70+
{
71+
"uuid": "6d1d82d5-bf3e-48af-9139-87d7165ed509",
72+
"description": "16 is XVI",
73+
"comments": [
74+
"16 has exactly one occurence of all symbols whose value is less than 50 (L) in decreasing order"
75+
],
76+
"property": "roman",
77+
"input": {
78+
"number": 16
79+
},
80+
"expected": "XVI"
81+
},
7082
{
7183
"uuid": "2bda64ca-7d28-4c56-b08d-16ce65716cf6",
7284
"description": "27 is XXVII",
@@ -107,6 +119,18 @@
107119
},
108120
"expected": "LIX"
109121
},
122+
{
123+
"uuid": "4465ffd5-34dc-44f3-ada5-56f5007b6dad",
124+
"description": "66 is LXVI",
125+
"comments": [
126+
"66 has exactly one occurence of all symbols whose value is less than 100 (C) in decreasing order"
127+
],
128+
"property": "roman",
129+
"input": {
130+
"number": 66
131+
},
132+
"expected": "LXVI"
133+
},
110134
{
111135
"uuid": "46b46e5b-24da-4180-bfe2-2ef30b39d0d0",
112136
"description": "93 is XCIII",
@@ -136,6 +160,18 @@
136160
},
137161
"expected": "CLXIII"
138162
},
163+
{
164+
"uuid": "902ad132-0b4d-40e3-8597-ba5ed611dd8d",
165+
"description": "166 is CLXVI",
166+
"comments": [
167+
"166 has exactly one occurence of all symbols whose value is less than 500 (D) in decreasing order"
168+
],
169+
"property": "roman",
170+
"input": {
171+
"number": 166
172+
},
173+
"expected": "CLXVI"
174+
},
139175
{
140176
"uuid": "cdb06885-4485-4d71-8bfb-c9d0f496b404",
141177
"description": "402 is CDII",
@@ -155,6 +191,18 @@
155191
},
156192
"expected": "DLXXV"
157193
},
194+
{
195+
"uuid": "dacb84b9-ea1c-4a61-acbb-ce6b36674906",
196+
"description": "666 is DCLXVI",
197+
"comments": [
198+
"666 has exactly one occurence of all symbols whose value is less than 1000 (M) in decreasing order"
199+
],
200+
"property": "roman",
201+
"input": {
202+
"number": 666
203+
},
204+
"expected": "DCLXVI"
205+
},
158206
{
159207
"uuid": "432de891-7fd6-4748-a7f6-156082eeca2f",
160208
"description": "911 is CMXI",
@@ -174,63 +222,6 @@
174222
},
175223
"expected": "MXXIV"
176224
},
177-
{
178-
"uuid": "bb550038-d4eb-4be2-a9ce-f21961ac3bc6",
179-
"description": "3000 is MMM",
180-
"property": "roman",
181-
"input": {
182-
"number": 3000
183-
},
184-
"expected": "MMM"
185-
},
186-
{
187-
"uuid": "6d1d82d5-bf3e-48af-9139-87d7165ed509",
188-
"description": "16 is XVI",
189-
"comments": [
190-
"16 has exactly one occurence of all symbols whose value is less than 50 (L) in decreasing order"
191-
],
192-
"property": "roman",
193-
"input": {
194-
"number": 16
195-
},
196-
"expected": "XVI"
197-
},
198-
{
199-
"uuid": "4465ffd5-34dc-44f3-ada5-56f5007b6dad",
200-
"description": "66 is LXVI",
201-
"comments": [
202-
"66 has exactly one occurence of all symbols whose value is less than 100 (C) in decreasing order"
203-
],
204-
"property": "roman",
205-
"input": {
206-
"number": 66
207-
},
208-
"expected": "LXVI"
209-
},
210-
{
211-
"uuid": "902ad132-0b4d-40e3-8597-ba5ed611dd8d",
212-
"description": "166 is CLXVI",
213-
"comments": [
214-
"166 has exactly one occurence of all symbols whose value is less than 500 (D) in decreasing order"
215-
],
216-
"property": "roman",
217-
"input": {
218-
"number": 166
219-
},
220-
"expected": "CLXVI"
221-
},
222-
{
223-
"uuid": "dacb84b9-ea1c-4a61-acbb-ce6b36674906",
224-
"description": "666 is DCLXVI",
225-
"comments": [
226-
"666 has exactly one occurence of all symbols whose value is less than 1000 (M) in decreasing order"
227-
],
228-
"property": "roman",
229-
"input": {
230-
"number": 666
231-
},
232-
"expected": "DCLXVI"
233-
},
234225
{
235226
"uuid": "efbe1d6a-9f98-4eb5-82bc-72753e3ac328",
236227
"description": "1666 is MDCLXVI",
@@ -243,6 +234,15 @@
243234
},
244235
"expected": "MDCLXVI"
245236
},
237+
{
238+
"uuid": "bb550038-d4eb-4be2-a9ce-f21961ac3bc6",
239+
"description": "3000 is MMM",
240+
"property": "roman",
241+
"input": {
242+
"number": 3000
243+
},
244+
"expected": "MMM"
245+
},
246246
{
247247
"uuid": "3bc4b41c-c2e6-49d9-9142-420691504336",
248248
"description": "3001 is MMMI",

0 commit comments

Comments
 (0)