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"
}
},
{
"uuid": "c6c795bf-a288-45e9-86a1-841359ad426d",
"description": "negative value is an error",
"property": "steps",
"input": {
"number": -15
},
"expected": {
"error": "Only positive numbers are allowed"
}
},
{
"uuid": "ec11f479-56bc-47fd-a434-bcd7a31a7a2e",
"reimplements": "c6c795bf-a288-45e9-86a1-841359ad426d",
"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?