Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • You have several options:

    • Leave those bits untested.
    • Break the problem up into smaller steps. Instead of building a string and printing it from one routine, break it into two routines, one that builds the string and one that prints it. You can test the building one automatically and the printing one by hand if you need to.
    • Use mock objects or packages or subs to test the printing or display routines.
    • Add more accessors to your graphics objects -- test that a certain set of pixels are correct or that th
    • You can test the building one automatically and the printing one by hand if you need to.

      Ugh, no testing by hand, thanks. :) That's why the question "how do I test a routine that prints something" still exists after I design for testing and break the routine up. The other ideas were good, though; thanks.

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers