Ad
  • Custom User Avatar

    From the description:

    You are given a string made up of chains of emotes separated by 1 space each, with chains having 2 spaces in-between each.

    All your generated random tests consist of only one chain.

  • Default User Avatar

    In the Discourse of the Kata doesn't take into consideration this problem if you could specify a bit more.

  • Default User Avatar

    Thank you for taking the time to check the translation, I have made the changes you suggested.

  • Custom User Avatar

    Random tests do not create test cases with separate words but only encoded spaces.

  • Custom User Avatar
    • I think that non-printable characters wer removed from the kata (per one of my suggestions), so please double-check if the fixed test for '\0' is still relevant.
    • Recreating the new Random() in every loop iteration in every of 100 testcases is unnecessary. The tests could use a ThreadLocalRandom instead, or a Random instance field of the test class.
    • Random already has the nextInt(lo, hi), and Random().nextInt(256 - 32) + 32) is unnecessarily complex. You could also avoid magic numbers by sampling characters from an alphabet string.
    • Calling string.toString() twice is unnecessary.
    • Tests provide no debuggable feedback. IDeally, inputs of failing tests would be presented either as titles of test cases, or in failed assertion messages.

    You can check the collection of the example kata for some ideas.

  • Default User Avatar