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.
Merge conflict, fork and update the description.
True on the stdio.h, added it for good measure, but it seems to work fine without it, perhaps added by the system somehow.
srand was a good spot as well, ty.
Yes.
Since
Get_Sum
is called after the solution, the random tests can still be bypassed with an overloaded solution changing its arguments by reference, but for a 7 kyu with a sufficient number of fixed tests it's probably OK.stdio.h
should be included forprintf
.The random tests should initialize RNG with
srand
.11 months later :). Thanks for the thoughts, better?
Don't put the solution in Preloaded, make a private method of
Describe(Random_Tests)
(which is a macro creating a class) instead.The arguments of
Assert::That
in the random tests are in the wrong order. It's better to call the reference solution before the assertion for user's solutions not to be able to change the arguments.As you can probably see i'm totally new to codewars, and just wanted a sneak peak at how translations etc works.
I think I have clicked all buttons needed for someone else to review and whatnot, so if not, let me know if I can fix something.
What happens if you are sent one very long word?