Ad
  • Custom User Avatar
    • Please add assertion failure messages writing the input.
    • Please add leading and trailing spaces in fixed, sample, and random tests.
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
  • Custom User Avatar

    The comment about s1 and s2 being null terminated should only appear in the related language.

    Change s1 and s2 to str1 and str2 or viceversa to be consistent.

  • Custom User Avatar

    You are right that tests are a mess, but it's not specific for this particular kata. It's very common for kata authors to organize tests in a way that test cases are not easy to distinguish one from another, inputs and other information is not shown explicitly, assertion messages are consufing or not informative. For some reason this way of (non-)organization of tests became a standard in CW kata and many users (including authors) do not see a problem with this, while others (like, for example, me) are extremelly annoyed by this, but have no time nor resources to fix all this many of existing kata.

    You are wrong though that display of logs and tests results is inconsistent. Logs from a test case always appear above the assertion message (i.e. the green or red line). Your solution is run first, it prints whatever you log, and then assertion is performed displaying a green/red line. Test cases do not display logs below the result message. It's always above.

  • Custom User Avatar

    And I haven't said that the kata is unsolvable, I just want the tests to be fixed.
    To correspond to the given logs and also to have the test results in the logs.

  • Custom User Avatar

    My screenshot show how the log appears not only after the test result, but also before it.
    You need to look very carefully in order to solve this mess of a tests.
    The first log corresponds to the test below, the second log to the test below too,
    and the next log should be with the test above?

  • Custom User Avatar

    python

  • Custom User Avatar

    Language?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Fix your code. Hmm, I guess ~9000 people solved it in python by mistake.

    Your screenshot shows you returning True, when it should be False (and quite obvious why, since 'x' is only in one of the strings)

  • Custom User Avatar

    Yeah the kata is fine, but it's test cases are a total mess
    https://ibb.co/8jJSG1v If these logs appears above the test result...
    as I said: Fix your kata.
    You can for example print the test cases in the tests.

  • Loading more items...