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

use Perl Log In

Log In

[ Create a new account ]

djberg96 (2603)

djberg96
  (email not shown publicly)

Journal of djberg96 (2603)

Thursday August 22, 2002
01:20 PM

More on the WriteExcel port

[ #7246 ]
I think I've finished porting the first of the Spreadsheet::WriteExcel modules, called OLEWriter.

I say I think, because I'm not sure how to test it. At first I thought I could just steal John's own tests and slap them into Ruby's Test::Unit module or something.

But then I realized....there *aren't any tests*! I'm not upset or anything (that would make me a blithering hypocrite, if nothing else), but I *am* surprised.

I'm surprised because it seems like for a module of this complexity there would be a lot of room for little errors, especially with all of the specific hex values you have to use. There must have been quite a bit of trial and error, then.

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.
  • In the CPAN distribution of Spreadsheet::WriteExcel there is only has one real test and that is to determine if the hardware supports a 64 bit IEEE float.

    The reason that there aren't more tests is that there isn't any way to test the module apart from creating a file, opening it in Excel, checking if the required features are okay and then closing it again. This isn't something that can be automated on a cross-platform basis.

    It would be possible to generate an Excel file, MD5 the results and check it agai
    • Heh - caught me.

      I guess what I expected to see were tests where you write particular strings and numbers to a cell or group of cells, then check to see if the values written to the file are what you expect (like an "od" check or something). I realize that this is somewhat artificial, but it would at least let you know if you had made any *obvious* errors.

      I realize the acid test is to just open the file in Excel and see if it worked. I was just hoping there would be some intermediate testing I could do

    • The reason that there aren't more tests is that there isn't any way to test the module apart from creating a file, opening it in Excel, checking if the required features are okay and then closing it again.

      I will tell you something that is true: that sounds like a dare. (I do have plenty of tasks already.)

    • I test it all the time. Seems to work great! :)

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