Ad
  • Custom User Avatar

    Ooohhhh my mistake. Thank you very much for the clarification there.

  • Custom User Avatar

    The brackets highlight the difference between both results, that's from JUnit, and they're not part of neither of those values. Your code is failing the first assertion in testOddString tests, not a kata issue. This test:

           String s = "abcde";
           assertEquals("Should handle odd string","[ab, cd, e_]", Arrays.toString(StringSplit.solution(s)));
    

    You can see there that for "abcde"should be ["ab", "cd", "e_"] exactly like the last example in the description.

  • Custom User Avatar

    In Java, I think the testing criteria are off for the odd strings.

    "Should handle odd string expected:<[ab, [cd, ]e_]> but was:<[ab, []e_]>"

    I think the brackets are breaking it, and I couldn't get my code to read the expected output, because it would wind up as "[ab, [c, d], e_]" even if it took the brackets into account. Am I messing up though?