Package Info

perl-Test-Identity


Assert the Referential Identity of a Reference


Development/Libraries/Perl

This module provides a single testing function, 'identical'. It asserts that a given reference is as expected; that is, it either refers to the same object or is 'undef'. It is similar to 'Test::More::is' except that it uses 'refaddr', ensuring that it behaves correctly even if the references under test are objects that overload stringification or numification.

It also provides better diagnostics if the test fails:

$ perl -MTest::More=tests,1 -MTest::Identity -e'identical [], {}' 1..1 not ok 1

$ perl -MTest::More=tests,1 -MTest::Identity -e'identical [], []' 1..1 not ok 1


License: Artistic-1.0 or GPL-1.0+
URL: http://search.cpan.org/dist/Test-Identity/

Categories

Releases

Package Version Update ID Released Package Hub Version Platforms Subpackages
0.01-bp155.2.10 info GA Release 2023-05-17 15 SP5
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Test-Identity
0.01-bp154.1.23 info GA Release 2022-05-09 15 SP4
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Test-Identity
0.01-bp153.1.15 info GA Release 2021-03-06 15 SP3
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Test-Identity
0.01-bp152.3.16 info GA Release 2020-04-16 15 SP2
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Test-Identity
0.01-bp151.3.1 info GA Release 2019-07-16 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Test-Identity
0.01-bp151.2.14 info GA Release 2019-05-18 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Test-Identity
0.01-bp150.2.4 info GA Release 2018-07-30 15
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Test-Identity