Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Test::More usage to test functions that die

by stvn (Monsignor)
on Dec 08, 2004 at 15:31 UTC ( #413229=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    eval {
        $a->f1( ) 
    };
    ok($@, '... an exception has been thrown');
    like($@, qr/\- parameter1 required/, '... and it is the correct except
    +ion');
    
  2. or download this
    eval {
        $a->f1("paramter" ) 
    };
    ok(!$@, '... no exception has been thrown');
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://413229]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2022-01-22 21:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (63 votes). Check out past polls.

    Notices?