Loading ...
Sorry, an error occurred while loading the content.

Re: Unit testing assertions (was Re: [XP] Test Objectives (was:Re: Unit Test Challenge II))

Expand Messages
  • Peter Hansen
    ... I think I understand now. My response would be to suggest that rather than terminating the program, it is always more appropriate to capture the failure
    Message 1 of 1 , Apr 2, 2002
    • 0 Attachment
      "C. Keith Ray" wrote:
      >
      > on 2002.04.02 5:30 AM, Peter Hansen at peter@... wrote:
      >
      > > If assertions cause instant program termination, aren't they a bug?
      >
      > Yes. But if the assertion wasn't there, the bug might not be visible until
      > an indeterminate time later, perhaps after screwing up your data. My idea of
      > an assertion is to make a bug visible in a safe way.

      I think I understand now.

      My response would be to suggest that rather than terminating the
      program, it is always more appropriate to capture the failure information
      in a nice traceback package which can be saved somewhere for feeding
      back to the development team. But in the end the choice of whether
      to do that or to simply abort loudly becomes a Customer decision.

      -Peter
    Your message has been successfully submitted and would be delivered to recipients shortly.