perldoc > Test::Unit::Assertion

📛 NAME

Test::Unit::Assertion — The abstract base class for assertions

🚀 Quick Reference

Use CaseCommandDescription
📝 Create a custom assertion subclass package MyAssertion; use base 'Test::Unit::Assertion'; Define a new assertion class that inherits from the abstract base
🛠️ Implement the assertion logic sub do_assertion { ... return 1 if success; } Override do_assertion to return true on success, false or throw on failure
🔗 Use with Test::Unit::Assert Test::Unit::Assert::assert( MyAssertion->new(...) ) Pass an assertion object to assert; it calls do_assertion

📛 NAME

Any assertion class that expects to plug into Test::Unit::Assert needs to implement this interface.

📋 Required methods

✍️ AUTHOR

Copyright (c) 2001 Piers Cawley <pdcawley AT 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

Test::Unit::Assertion
📛 NAME 🚀 Quick Reference 📛 NAME
📋 Required methods
✍️ AUTHOR 📚 SEE ALSO

Generated by phpman v4.9.26-5-g7740029 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-15 20:55 @216.73.216.208
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!