On Thu, Aug 30, 2001 at 04:37:04PM -0400, Joe McMahon wrote:
> I took the printf(), added an sprintf() and another conditional 
> operator, and got the following:
> 
> my $test = 1;
> sub ok {
>    my($ok, $name) = @_;
> 
>    printf "%sok %d - %s%s\n", $ok ? "" : "not ", $test, $name,
>           ($ok ? "" : sprintf("\t# Failed test at line %d\n", 
> (caller)[2]));

This statement makes my eyes bleed.  You don't have to shove them
together like that.  And the "# Failed" should be on a seperate line.

    printf "%sok %d - %s\n", ($ok ? "" : "not "), $test, $name;

    printf "# Failed test at line %d\n", (caller)[2] unless $ok;


> Also, there were a couple of places where the test was for a 
> "Modification of a read-only value attempted at ..." message, so I added 
> a couple of eval{} blocks and tested $@ in those cases.

Good good.

> I think that covers the bases for concat.t now. Full patch attached.

Ok.  I'll repatch with the sensible ok() and send this one onto p5p.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One
Death follows me like a wee followey thing.
        -- Quakeman

Reply via email to