Test::Unit::Assertion - The abstract base class for assertions River stage two • 11 direct dependents • 16 total dependents

MCAST/Test-Unit-0.25 - 15 Oct 2005 23:05:28 GMT

Test::Unit::Assertion::Regexp - Assertion with regex matching River stage two • 11 direct dependents • 16 total dependents

The class is used by the framework to provide sensible 'automatic' reports when a match fails. The old: $self->assert(scalar($foo =~ /pattern/), "$foo didn't match /.../"); seems rather clumsy compared to this. If the regexp assertion fails, then the...

MCAST/Test-Unit-0.25 - 15 Oct 2005 23:05:28 GMT

Test::Unit::Assertion::Boolean - A boolean assertion River stage two • 11 direct dependents • 16 total dependents

MCAST/Test-Unit-0.25 - 15 Oct 2005 23:05:28 GMT

Test::Unit::Assertion::CodeRef - A delayed evaluation assertion using a Coderef River stage two • 11 direct dependents • 16 total dependents

This class is used by the framework to allow us to do assertions in a 'functional' manner. It is typically used generated automagically in code like: $self->assert(sub { $_[0] == $_[1] or $self->fail("Expected $_[0], got $_[1]"); }, 1, 2); (Note that...

MCAST/Test-Unit-0.25 - 15 Oct 2005 23:05:28 GMT

Test::Unit::Assertion::Exception - A assertion for raised exceptions River stage two • 11 direct dependents • 16 total dependents

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

MCAST/Test-Unit-0.25 - 15 Oct 2005 23:05:28 GMT

5 results (0.02 seconds)