Duplicate cases in canonical-data.json

As I’ve been building the exercises for Euphoria, I’ve notice a few places where there appear to be duplications in the “cases” of a given task’s problem-specifications. For example collatz-conjecture contains

``````    {
"uuid": "7d4750e6-def9-4b86-aec7-9f7eb44f95a3",
"description": "zero is an error",
"property": "steps",
"input": {
"number": 0
},
"expected": {
"error": "Only positive numbers are allowed"
}
},
{
"uuid": "2187673d-77d6-4543-975e-66df6c50e2da",
"reimplements": "7d4750e6-def9-4b86-aec7-9f7eb44f95a3",
"description": "zero is an error",
"comments": ["Collatz Conjecture holds only for positive integers"],
"property": "steps",
"input": {
"number": 0
},
"expected": {
"error": "Only positive integers are allowed"
}
},
{
"description": "negative value is an error",
"property": "steps",
"input": {
"number": -15
},
"expected": {
"error": "Only positive numbers are allowed"
}
},
{
"uuid": "ec11f479-56bc-47fd-a434-bcd7a31a7a2e",
"description": "negative value is an error",
"comments": ["Collatz Conjecture holds only for positive integers"],
"property": "steps",
"input": {
"number": -15
},
"expected": {
"error": "Only positive integers are allowed"
}
}
``````

The tests are slightly different in the text of the error message (one says “numbers” and the other “integers”), however the name of the test is exactly the same. I have code that renders the JSON into unit test specifications and I end up with essentially duplicated tests, viz

``````test_equal("zero is an error",steps(0),"Only positive numbers are allowed")
test_equal("zero is an error",steps(0),"Only positive integers are allowed")
test_equal("negative value is an error",steps(-15),"Only positive numbers are allowed")
test_equal("negative value is an error",steps(-15),"Only positive integers are allowed")
``````

Is this a bug or a feature?

Notice the `"reimplements"` field on some of them. This is documented somewhere, hold on…

Hmm … didn’t “see” that before but now that you point it out …

Documentation here: relevant section in problem-specifications readme.

Thank you. Makes sense.

Yeah. I’ve made the same mistake A `deprecated` field on the old exercise would make the data a bit easier to read, but … instead there is a backwards reference.