Ad
  • Custom User Avatar

    What I meant here is that inputs like .52 and 6. are considered valid, which is not immediately obvious. Output of course should be formatted to a well-formed format.

  • Default User Avatar

    The tests now also check for leading/trailing zeros and the code also trims them.

  • Default User Avatar

    Thank you, it should be fixed now. Let me know if something else must be changed, this is my first kata :)

  • Custom User Avatar

    You have to take into consideration that the output format must be X.X where X is a number.

    Random tests often expects incorrectly formatted numbers, such as 032. -> 032.0 and .470590 -> 0.470590.

    In fact, there are no considerion about integers and leading/trailing zeroes, so the results can barely be called a decimal number: we don't normally express them as something like 000005.500000 instead of 5.5. (Trailing .0 on integer values is debatable as well.) Or rather, the title should be changed: Double is a very different beast from decimal number.

  • Custom User Avatar

    It is not specified what is considered a valid decimal number. .52 and 6. are somehow considered valid.

    Similarly, null handling is required but not specified.

  • Default User Avatar

    Fixed invalid number case.
    Separated nullity, empty String and invalid numbers in different tests.
    Made random test execute 50 times instead of 1.

  • Default User Avatar