Ad
  • Custom User Avatar

    By the same reason "same(None, None)" returns False

    Well, It's ok None and [] should be treaded differently. But it should be said explicitly. Nothing is evident when we deal with values like None, False, 0, [], "", NULL etc. It all should be said explicitly.

  • Default User Avatar

    I also agree. With the given error messages, I don't really know what to correct:

    test5(AreSameTest)
    Unknown Test Failure
    test6(AreSameTest)
    8

    It's still a good kata, just needs more explicit error messages :)

  • Custom User Avatar

    It was in Java. That's a shame that you can't edit it. It would be a really simple fix and would make this kata a lot less frustrating and more fun.

    Thanks for your response though :P

  • Default User Avatar

    Which language?
    PS: I can't anymore modify the kata because more than 500 codewarriors (735) succeeded:-(

  • Custom User Avatar

    I had the same issue and I agree with bkaes. Please make tests more explicit and clear.

  • Custom User Avatar

    The tests for this kata need work. Here's a sample of what the results look like when I submit my solution:

    test2(AreSameTest)
    121 121
    361 361
    361 361
    361 14641
    Test Passed

    test4(AreSameTest)
    expected: but was:

    test7(AreSameTest)
    121 121
    361 361
    14641 14641
    20736 20736
    25921 25921
    36481 36481
    38025 38025
    2073600 2073600
    Test Passed

    test8(AreSameTest)
    196 0
    expected: but was:

    Obviously this is very frustrating to code warriors. I can't even tell why the tests are failing! Tests 4 and 8 don't tell me what they're testing or even what the expected/actuals were, so I forfeited this kata even though the other tests all passed.

    Please fix for future warriors.

  • Default User Avatar

    Read again the description, if they are both empty why should it be false?

  • Custom User Avatar

    "If a or b are empty the result is evident by itself."

    I was sure is it evident that same([], []) should return False, but tests say it should return True. So it is not evident :)