Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Inverting test conditions in Test::More ?

by LanX (Cardinal)
on Jul 24, 2020 at 12:14 UTC ( #11119748=note: print w/replies, xml ) Need Help??


in reply to Re: Inverting test conditions in Test::More ?
in thread Inverting test conditions in Test::More ?

Supposing I just wanted to test deeply nested structures ...

> Looks like you could easily use Test::More::_deep_check

that's an internal function, Test::More provides explain() for serialization within the regular API

see also eq_array() and eq_hash() but "they may be deprecated in future versions."

> If you can ensure consistent/ordered serialization in the case of your structures being hash refs

Please note that the order of hash-keys within the same Perl run is guarantied to be stable.

Furthermore is explain() ordering hash-keys alphabetically AFAICT.

( Data::Dump too IIRC )

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re^2: Inverting test conditions in Test::More ?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11119748]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2020-09-19 02:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (114 votes). Check out past polls.

    Notices?