Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

test::unit::assertion(3pm) [debian man page]

Test::Unit::Assertion(3pm)				User Contributed Perl Documentation				Test::Unit::Assertion(3pm)

NAME
Test::Unit::Assertion - The abstract base class for assertions NAME
Any assertion class that expects to plug into Test::Unit::Assert needs to implement this interface. Required methods new Creates a new assertion object. Takes whatever arguments you desire. Isn't strictly necessary for the framework to work with this class but is generally considered a good idea. do_assertion This is the important one. If Test::Unit::Assert::assert is called with an object as its first argument then it does: $_[0]->do_assertion(@_[1 .. $#_]) || $self->fail("Assertion failed"); This means that "do_assertion" should return true if the assertion succeeds and false if it doesn't. Or, you can fail by throwing a Test::Unit::Failure object, which will get caught further up the stack and used to produce a sensible error report. Generally it's good practice for do_assertion to die with a meaningful error on assertion failure rather than just returning false. AUTHOR
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. SEE ALSO
o Test::Unit::Assert o Test::Unit::CodeRef o Test::Unit::Regexp perl v5.8.8 2006-09-13 Test::Unit::Assertion(3pm)

Check Out this Related Man Page

Test::Unit(3pm) 					User Contributed Perl Documentation					   Test::Unit(3pm)

NAME
Test::Unit - the PerlUnit testing framework SYNOPSIS
This package provides only the project version number, copyright texts, and a framework overview in POD format. DESCRIPTION
This framework is intended to support unit testing in an object-oriented development paradigm (with support for inheritance of tests etc.) and is derived from the JUnit testing framework for Java by Kent Beck and Erich Gamma. To start learning how to use this framework, see Test::Unit::TestCase and Test::Unit::TestSuite. (There will also eventually be a tutorial in Test::Unit::Tutorial. However "Test::Unit::Procedural" is the procedural style interface to a sophisticated unit testing framework for Perl that . Test::Unit is intended to provide a simpler interface to the framework that is more suitable for use in a scripting style environment. Therefore, Test::Unit does not provide much support for an object-oriented approach to unit testing. COPYRIGHT
Copyright (c) 2000-2002, 2005 the PerlUnit Development Team (see the AUTHORS file included in this distribution). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. That is, under the terms of either of: o The GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. The text of version 2 is included in the PerlUnit distribution package as COPYING.GPL-2. o The "Artistic License" which comes with Perl. The text of this is included in the PerlUnit distribution package as COPYING.Artistic. SEE ALSO
o Test::Unit::TestCase o Test::Unit::TestSuite o Test::Unit::Procedural FEEDBACK
The Perl Unit development team are humans. In part we develop stuff because it scratches our collective itch but we'd also really like to know if it scratches yours. Please subscribe to the perlunit-users mailing list at <http://lists.sourceforge.net/lists/listinfo/perlunit-users> and let us know what you love and hate about PerlUnit and what else you want to do with it. perl v5.8.8 2006-09-13 Test::Unit(3pm)
Man Page