Ad
  • Default User Avatar

    The instructions state you won't get negative numbers on input, therefore IMO it's like a contract and you really don't need to count with negative numbers in this case. This is why the kata tests also pass because they won't send you any single negative number. Also check the similar answer from @Chrono79 below.

  • Default User Avatar

    This is correct since the acceptance criteria don't expect negative numbers as input parameter. We are not trying to do classic sad path validation.