Slash Boxes
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

use Perl Log In

Log In

[ Create a new account ]

ethan (3163)

  reversethis-{ed. ... rap.nov.olissat}

Being a 25-year old chap living in the western-most town of Germany. Stuying communication and information science and being a huge fan of XS-related things.

Journal of ethan (3163)

Saturday January 10, 2004
08:16 AM

Writing tests

[ #16747 ]

Continuing Device::CDROM, it's soon time for a first release. I am adding the documentation right now.

What really gives me headache are the tests. How would you test a module that performs ioctls to control the CDROM drive?
What I can do is querying the capabilities of the drive and then do those things that it should be able to do. Like when CDC_OPEN_TRAY and CDC_CLOSE_TRAY are set, I can open and close the drive and check the return value of those commands.

Harder are those things that require a disc inside the drive. Also, for a thorough test the user would need to have a handful of different kind of discs: an audio CD, a data CD, one with multisession etc. Maybe I can divide the tests into those that can run non-interactively (those aren't very many) and all the others that need human interaction. Similar to what Term::ReadKey does.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.