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.
I was afraid that there would be phrases like "TREE FIDDY" or "THREE FIFTY", and wrote unnecessary command s.toLowerCase().
Finally, somebody else with a reasonable solution - who could see that you can just add 63 to get the next number
This comment is hidden because it contains spoiler information about the solution
Is there any place you can reference that unrolls this lazyness for us? I find it hard to tell that it's using laziness.
astonishing !!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
not deal with '-123'
AssertEquals does not work because you're testing arrays, and because arrays are object, AssertEquals tests if they are the same instance, which is not the case.
AssertSimilar checks if the values are the same, even if the instance is not.
Hey Abbe, Thanks for pointing that out, I forgot to change the example test cases! Will do now..
Yes i do plan on making a general one.. But first I will look at 3 variables. Cheers :)
The example test cases should be using
Test.assertSimilar
just like the real ones. The currentTest.expect
tests are passing as long as your code doesn't throw an exception. :-)Thanks for a nice kata.
Do you consider making a more general one for more variables?
Now using test.assertSimilar as assertEquals would not pass any tests.
Thanks so much for this. I don't understand why test.assertEquals() didn't work, so used expect as a stop-gap.
Hopefully assertSimilar will work better. Thanks again!
Your test currently always pass if the user returns any non falsy result.
You must use assertSimilar and not expect for your tests to behave the way you expect them to.
Your test are not working... You must change Test.expect to Test.assertEquals
Loading more items...