Ad
  • Custom User Avatar

    Sample tests are not using the test framework properly.

  • Custom User Avatar

    Updated description and example tests.

    Suggestions:

    • add random tests, or at least more tests in random order, and display the number of expected symbols/words/sentences in those tests
    • also fix your solution (and the possible solver function for random tests), because you use split(" ") to count the words, but that gives wrong results with leading/trailing spaces, as it was the case with one of your test cases -- you know, "a b c ".split(" ") = ["a", "b", "c", ""]
    • add more edge cases and explanations as suggested by @Blind4Basics
    • perhaps rename kata to "readability"
  • Default User Avatar

    Well, me again... ;)

    • that's way better but you "have to" put the example from the description in the sample tests (otherwise it's not useful/to the warriors to do it, and that's not being nice toward them).
    • not enough tests! And would be better to have random tests too.
    • my solution passed the tests but still does not work properly with the example of wiki, for example.

    EDIT: possible edge cases to add (or not!) / explain:

    • "Marie-France" => 1 or 2 words?
    • multiple ponctuation signs..., WHAT-THE...!??!!??? (Damn, that would make a nice one, that... ;o )