You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation at present implies that if either of them is a non-ref, that both will be treated as non-refs.
"Similar to is(), except that if $got and $expected are references, it does a deep comparison walking each data structure to see if they are equivalent."
Which is what appears to happen for objects.
But pure refs are treated as a failure if their type is different,
- Fix skip_all in require in intercept (#696)
- Documentation of what is better in Test2 (#663)
- Document Test::Builder::Tester plan limitations
- Document limitations in is_deeply (#595)
- Better documentation of done_testing purpose (#151)
- Make ctx->send_event detect termination events (#707)
The is_deeply documentation doesn't explain why:
The documentation at present implies that if either of them is a non-ref, that both will be treated as non-refs.
Which is what appears to happen for objects.
But pure refs are treated as a failure if their type is different,
The real mechanic behind why the first example passes and the second fails, is that
Test::Builder::_unoverload
is applied to all arguments in blanket fashionWhich means that if any arguments have string overloading support, they will be replaced with their string forms.
Which ultimately means if you have a system that looks slightly like this, then is_deeply is the wrong tool:
The text was updated successfully, but these errors were encountered: