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

Re: [XP] What to test

Expand Messages
  • Steve Freeman
    From: ... that ... code ... If your parser is that complicated, maybe you should pull it out into a class and test it separately, then your
    Message 1 of 2 , Nov 4, 2002
    • 0 Attachment
      From: <chelck@...>
      > [...]
      > public class DependencyChecker {
      > public List getDependencies(Class clazz); // Returns a list of Classes
      that
      > clazz uses.
      > private List parse(String signature); // Returns a list of classes used by
      > signature.
      > }
      >
      > Our question is whether we should write tests that exercise the parsing
      code
      > directly? He argues that we can and should do all the tests via the main
      > interface. I argue that's too hard, and that if we change parse() to be
      > package private then we can really beat the crap out of the parsing logic
      > directly.

      If your parser is that complicated, maybe you should pull it out into a
      class and test it separately, then your dependency checker need only test
      that it's being talked to correctly?

      S.

      - - - - - - - - - - - - - - -
      Steve Freeman steve@...
      Programme chair OT2003. http://www.ot2003.org
      Come to XpDay London. http://www.xpday.org

      "Nonsense is just nonsense, but the study of nonsense is science."
    Your message has been successfully submitted and would be delivered to recipients shortly.