> Hi Alain, > > Apologies for the belated response. Been in bed most of this > week with evil lurgy and have been avoiding e-mail - and > computers in general :-)
Sorry to hear about that. Hope you are better now. > > On 23 May 2007, at 21:06, Desilets, Alain wrote: > > > I finally got round to trying assert_deep_equals(). > Unfortunately, I > > don't get the kind of nice diagnostic message you mentioned in your > > message of a week ago. Attached is a sample test program. > When I run > > it, all I get is the following error message: > [snip] > > You're not getting the diagnostic because you gave your own > description string for the failure. Leave it out and you'll get the > diagnostics. OK, thx. I had assumed that assert_deep_equals() behaved like all other asserts in PerlUnit, i.e. the error message passed to it got prepended to whatever additional messages the assert might itself generate. I will look into the code for assert_deep_equals() and see if I can change it to behave that way (and submit the change to the PerlUnit team). I kind of like that behaviour, because it allows me to make my error messages more specific to what I am testing. As it turns out, I implemented my own version of something like assert_deep_equals(). Basically, it serializes the two structures using a PrettyPrinter that I found on the web, then does a string comparison between the two. > > As an aside - you should be passing class names as 'Strings' nor > BareWords. It's better style and will save you the no warnings/ > warnings. Hum... I was sure I had tried that at some point (long time ago) and that it didn't work. But I'll try again, thx. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Perlunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/perlunit-users
