April 14, 2012 82% of Perl Testing Back

Testing Alpha: 'die' conditions

        eval {
            $self = Alpha->new( {
                string  => undef,
            } );
        };
        like($@, qr/Alpha::new\(\) needs 'string' argument/,
            "Alpha->new(): got expected error message when 'string' was not defined");


Home Last TOC Copyright © 2012 James E Keenan Back Next