Test2::...::Assert(3)

πŸ“¦ version 1.302214, in opensuse-leap 16.0

πŸ’… NAME πŸ’…

Test2::EventFacet::Assert β€” Facet representing an assertion. This is a User Contributed Perl Documentation page, and yes bestie, the title is right there in the name. Iykyk. 🫢


✨ DESCRIPTION ✨

Okay so the assertion facet is provided by any event representing an assertion that was made. It’s giving β€œproof that somebody asserted something” energy, and it’s lowkey iconic. πŸ’–


πŸŽ€ FIELDS πŸŽ€

  • $string = $assert->{details} and $string = $assert->details() β€” Human readable description of the assertion. It’s the little explanation of what went down, bestie. πŸ¦‹
  • $bool = $assert->{pass} and $bool = $assert->pass() β€” True if the assertion passed. That’s the vibe check, and when it’s true it absolutely ate. πŸ”₯
  • $bool = $assert->{no_debug} and $bool = $assert->no_debug() β€” Set this to true if you have provided custom diagnostics and do not want the defaults to be displayed. So if you’re doing your own debug situation, flip this on and tell the default diagnostics to take a little nap. πŸ’…
  • $int = $assert->{number} and $int = $assert->number() β€” (Optional) assertion number. This may be omitted or ignored. This is usually only useful when parsing/processing TAP. Ngl, it’s a niche little field, but she’s valid. 🌸
Note: This is not set by the Test2 system, assertion number is not known until AFTER the assertion has been processed. This attribute is part of the spec only for harnesses. Caveat received, no cap. πŸ’€

🌈 SOURCE 🌈

The source code repository for Test2 can be found at <https://github.com/Test-More/test-more/>. Go look, bestie, it’s right there. ✨


πŸ‘‘ MAINTAINERS πŸ‘‘

Chad Granum <exodist@cpan.org> β€” carrying the maintainer crown. 🫢


🧚 AUTHORS 🧚

Chad Granum <exodist@cpan.org> β€” author credit, slay. πŸ’œ


Copyright Chad Granum <exodist@cpan.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Periodt. πŸ’–

See <https://dev.perl.org/licenses/>.


Signed, sealed, delivered: perl v5.42.0 on 2025-07-28, and this page is Test2::...::Assert(3). Byeee πŸ’…πŸŽ€

πŸ“¦ where this page comes from