Test::Unit::Assertion::Exception(3pm)

Test::Unit::Assertion::Exception3pm

A assertion for raised exceptions

Usage

    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 { });

Overview

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".

Releases

11 releases since Debian 3.1 (Sarge); the text changed 6 times.

  1. 3.1
  2. 4.0–7
  3. 8
  4. 9–10
  5. 11
  6. 12
  7. 13

Author

Copyright (c) 2001 Piers Cawley <[email protected]>.

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

From libtest-unit-perl 0.27-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.