GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test::Unit::Assertion::Exception(3) User Contributed Perl Documentation Test::Unit::Assertion::Exception(3)

Test::Unit::Assertion::Exception - A assertion for raised exceptions

    require Test::Unit::Assertion::Exception;

    my $assert_raised =
      Test::Unit::Assertion::Exception->new('MyException');

    # This should succeed
    $assert_eq->do_assertion(sub { MyException->throw() });

    # This should fail
    $assert_eq->do_assertion(sub { });

Although the SYNOPSIS shows how you'd use Test::Unit::Assertion::Exception directly, it is more sensibly used indirectly via "Test::Unit::Test::assert_raises()", which instantiates a "Test::Unit::Assertion::Exception".

Copyright (c) 2001 Piers Cawley <pdcawley@iterative-software.com>.

All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

  • Test::Unit::TestCase
  • Test::Unit::Assertion
2002-01-08 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.