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

Re: [extremeperl] unit tester

Expand Messages
  • Rob Nagler
    ... Testing does not make perfect. Code proofs don t even make perfect. The definition of perfect is constantly changing. Working out APIs a lot sooner is
    Message 1 of 33 , Aug 29, 2005
    • 0 Attachment
      Rob Kinyon writes:
      > That is a personal preference. I prefer mocks, because it allows me to
      > test in isolation. My theory is that perfect components will work
      > together perfectly. It also forces me to work out my APIs a lot
      > sooner. This means that I can refactor with confidence.

      Testing does not make perfect. Code proofs don't even make perfect.
      The definition of perfect is constantly changing.

      Working out APIs a lot sooner is great, but I prefer reality for this.
      I just ripped up a bunch of code, because reality was never what I
      thought it was, and it changed anyway to a thing called CSS.

      > Unfortunately, that doesn't work out in real life. I have only to
      > point to the Riemann Hypothesis. (There is no X^n + Y^n = Z^n, X, Y,
      > Z, and n being integers where n > 2.) The proof took 400 years, 300M
      > IQ points, and about 200 pages to accomplish.

      I wonder if anybody's refactored the proof to shorter than 200
      pages. :-) Refactoring is hard, and it takes a lot of IQ points, and,
      unfortunately, tightly refactored code (or proofs) requires a high IQ
      to understand.

      > Absolutely. And, I do refactor my tests. However, I focus primarily on
      > refactoring my code so that I need fewer tests overall. If I can test
      > the same functionality with fewer tests by using cleaner APIs and mock
      > objects, isn't that also good?

      My experience tends to be different. I often add tests before I
      refactor. I am refactoring, because the code is useful and in use,
      often in ways I never anticipated. The extra tests help me refactor,
      because they encode the assumptions I hadn't thought of when I wrote
      the code originally.

      Rob
    • Dave Cross
      ... You didn t get a reply to this. I hope this isn t too late to be useful. prove is a command line test runner. It s included with recent versions of
      Message 33 of 33 , Sep 14, 2005
      • 0 Attachment
        Terrence Brannon wrote:
        > Adam Sroka <adam.s@...> writes:
        >
        >
        >>I just use Test::More and prove.
        >
        >
        > what is prove? I could not find it in the main Test::More docs:
        >
        > http://search.cpan.org/~mschwern/Test-Simple-0.60/lib/Test/More.pm

        You didn't get a reply to this. I hope this isn't too late to be useful.

        prove is a command line test runner. It's included with recent versions
        of Test::Harness.

        http://search.cpan.org/dist/Test-Harness/

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