Ad
  • Custom User Avatar

    Hmm... I wonder how the testing for years will age.

    Change the thing to be "year has to be between 2000 and 2024 (inclusive)", to freeze that test in time and prevent any bugs that happen in a year or two.

  • Custom User Avatar
  • Custom User Avatar

    Well, something in the test is not right because I do no validate those cases correctly yet my solution still passes OK. Suggest add some more fix test cases instead of relying on random tests to cover all possibilities.

  • Custom User Avatar

    There were already a couple of random tests that produced inputs with mixed digits/letters format, I've increased the number of them

  • Custom User Avatar

    I think there are no test cases for digits appearing in the dlva or rand parts of the number plate. All should give error...

  • Custom User Avatar

    Yes, but I think 00 is not and some solutions do not handle it.

  • Custom User Avatar

    Thank you for your support and your suggestion, it really means a lot to me.

    I have preloaded the regions and updated the description, and added more specific error messages to the fixed tests with the reason for failure, hopefully they are satisfactory.

    Thanks again.

  • Custom User Avatar
  • Custom User Avatar

    Not testing plates with 00 age?

  • Custom User Avatar

    My solution does not account for the passage of time, but it'll pass this year, because it hardcodes 2020 as the future. Next year, I'd have to change that, but I won't submit again next year of course.

    If you want to test correctly, you'd have to devise some way of testing in the past and / or the future, as well as the present, to see if solutions actually account for the current date correctly.

    It can be done, I don't think it's easy, but if you don't do it, you might as well just hardcode now as 2019.

  • Custom User Avatar

    I'm still not sure how I feel about this. I did give you satisfied vote to keep it from being retired.. for now. This being your first kata and all the effort you seem to have put into it should be encouraged.

    What I would suggest, however, is to put the list of regions in an object in preloaded section, called REGIONS (for example), and also mention it in description, so people wouldn't have to copy paste it from description and occupy half the solution's space needlessly.

    Also, maybe you could add a few fixed blocks of tests for each case where an error can occur (invalid chars used here or there, invalid year, etc.), as it can be hard to figure out which rule you're violating without jumping back and forth to description. (Or return different error message / throw with that message, for different cases. That would make it a bit harder and invalidate all solutions tho)

  • Custom User Avatar
  • Custom User Avatar

    It's still there in random tests.

  • Custom User Avatar

    Good catch, thank you

  • Custom User Avatar

    Wow, good catch! I have updated them, thank you. Hopefully this is now resolved.

  • Loading more items...