Closed ee7 closed 1 year ago
How about changing them to say that they are invalid? Then languages can decide what that looks like.
I was also facing exception while creating the grains exercise for the gleam track!
Our current Grains
template checks the description for "error", and then generates a with raises
check that the student raises
with an appropriate error message. But we could also as easily check for 'invalid' in the description, or some other tag for error case.
In my generators I check whether the expected
is a hash with exactly one key called error
. I haven't made generators for every exercise in problem-specifications, but so far it's worked consistently:
But not all languages have exceptions.
At the time of writing,
grains
is the only exercise that mentions "exception" in the test description: