Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Deliberate failure in Test::More

by ikegami (Patriarch)
on Jun 07, 2010 at 01:47 UTC ( #843385=note: print w/replies, xml ) Need Help??


in reply to Deliberate failure in Test::More

If you wanna test whether an exception was thrown, try to catch one and report whether one was thrown or not.
my $incomplete = eval { Foo->new( first_name => 'Joe', ) }; ok( !$incomplete );

You could be more specific and check whether the right exception was thrown.

You might also like Test::Exception

Replies are listed 'Best First'.
Re^2: Deliberate failure in Test::More
by macrobat (Beadle) on Jun 07, 2010 at 06:53 UTC
    Thanks. I was trying to do that, but somewhere I was spacing out on capturing it. I'll check out Test::Exception.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2022-01-23 06:03 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?