Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Why do we need so many (any) random test cases - here?
There are only 4 possible (valid) input states...
Are we testing for maliciously wilful coders? Is this best practice?
One problem with this approach (in general) is that the tester has to already have the answer (working code)...
It's good as a teaching mechanism I guess, but not always practical as a test strategy for real world code - or am I missing something?
I suppose, if you were updating code - say optimising an algorithm - you could use your old code and random tests to sanity check/validate your new code.
No, it's not.
So you mean the sample cases, if I'm not mistaken, because the regular tests have this type of assertions. Anyway, done.
Apologies, javascript.
Please, specify the language implementation.
Would suggest putting a Math.abs() around difference in test cases...
i.e. Math.abs(got - expected) < delta
Also think closures are a more difficult concept.
IMO.. this should prob be a 6kyu problem.
Is this really using the concept of closures though?