Test::Struct

Test::Struct is a Perl extension for testing for structural equivelence.
Download

Test::Struct Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Yves Orton
  • Publisher web site:
  • http://search.cpan.org/~yves/Data-Consumer-0.09/lib/Data/Consumer.pm

Test::Struct Tags


Test::Struct Description

Test::Struct is a Perl extension for testing for structural equivelence. Test::Struct is a Perl extension for testing for structural equivelence.SYNOPSIS use Test::Struct; deep_eq($hairy_struct,$expected,'Hairy structural test'); is($x,$y); # and everything else Test::More has to offer!Test::Struct is used for doing deep structural comparisons of two objects. The module contains only one subrotuine which is intended to be used as a mix-in with other more generic Test::Builder derived modules like Test::More or Test::Simple. The code normally uses Scalar::Util for inspecting the data, but it will also use additional fine tuned comparison tools from Data::Dump::Streamer if they are available.deep_eq($got,$expected,$name)Does a deep level comparison of two objects. It traverses the two structures in parallel checking as many attributes as it can for differences. If the objects differ it will output a diagnostic message containing a list of the differences it encountered before it finished the comparison. Some types of mismatch prevent further comparison so the list may not be exhaustive.The intention of this routine is that it will pass the test only if $got is functionally identical to $expected. However, at current time there are some data types it does not handle properly, such as CODE refs. Requirements: · Perl


Test::Struct Related Software