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.
Wait, wait and wait ~~ OR you can come to discord #reviewing to promote it
I checked before making the fix, I thought you said that the harcoded 11s were a special case and the problem was persistant after Damjan fix;
About the thanks, no, I thank you for the time you spent. (it was a lot)
Now I am a bit scared about writing a new kata. Anyway maybe I learned some lessons :)
With these two lines hardcoded everything seems fine, with Damjan fix :)
How confusing! I think there was an error in string conversion. I tried printing the function input and got something like
1962+3376
when there was an error. I don't get any errors after replacing the relevant lines with this:Try it out and see if it works.
I've put the tests in the Example tests box, too because I noticed a very strange behaviour. The tests seem to be right, however my solution does not pass the tests from time to time, however when I manually try the random input from the tests in the console the solution passes as correct! I'm staring at the monitor. Please try validating your solution many times see if you can reproduce this behaviour. I dunno what's the issue. I've logged the random numbers in the error message in assertEquals so we can see them..
yeah i saw it when i tested:) and forgot to fix it in the comment; now it's fixed
Sorry if it sounded harsh! I think this is a great first kata and the random tests in your last comment look fine to me. :) There's a small typo though, in
&& <= 31
and the next line.This comment is hidden because it contains spoiler information about the solution
Well, I've never written some good tests in my life...Please be gentle. Also this kata allows contributors.
I'll do my best. I'll extend Sergiu's example.
Yes, definitely add random tests. You also need to add tests with invalid months/days.
I changed the Test cases there are more now and I'd say they are unpredictable.
The point was to actually write a regex :)
True. Due to copy paste. Fixed it. Thanks!
Junior developers should know about overflow