Ad
  • Custom User Avatar

    Needs tests. After I solved it correctly, I went back and was literally able to change the return type to String and still pass.

  • Custom User Avatar

    Solved it in Swift, passed all tests, but my solution doesn't show up in the list...

    Clicked on "My Solutions", and it shows up under this:

    Invalid Solutions:

    These solutions originally passed when they were submitted, however the kata's test cases have since been updated and these solutions now no longer pass.

    Wuh? (I did it twice in a row just to make sure the test cases were not actually being updated at the same time I was submitting)

  • Custom User Avatar

    You're right, I should have specified. I was also snarkier than I should have been, so apologies for that.

    While I am using Swift, I generalized my comment after reading some of the others with the same complaint.

    A better suggestion would be to edit the description so that it only shows the portion asserting how the input will be formatted to languages where this is true.

  • Custom User Avatar

    Reporting again since it's been 8 months since the last one...

    The input will always be a 4 digit string. So there is no need for year string validation

    Nope. Tests are full of 3 (or less) digit strings. Either the description should be changed, or the tests fixed.

    You have options. Pick one.

  • Custom User Avatar

    Bringing this up again to make a point...

    No one attempting this kata in Swift 4 can pass the tests, because the tests themselves throw errors.

    In Swift 4, toIntMax() has been completely removed. Unfortunately, it is used extensively in the tests.

    This can be fixed by casting variables to UInt() instead.

    So...

    let length = (range.upperBound - range.lowerBound + 1).toIntMax()

    becomes...

    let length = UInt(range.upperBound - range.lowerBound + 1)

    I had a solution in ~2 minutes, and now I’m left frustrated. Hopefully this can be fixed soon...

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    For Swift, the parameters in the function stub are of type Int, but the test cases supply type Int64. Not a huge deal to correct on the user end, but a little confusing at first. Changing the function stub parameter types to Int64 should remove the confusion.