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
cmp_deeply(
$test_data,
superhashof({ assertion-one }, { assertion-two }),
"two assertions about data are correct",
);
This seems to the casual reader like it asserts that $test_data is a superhash of both of the given hashrefs to superhashof. Instead, arguments after the first to superhashof are silently discarded meaning that the test appears to assert more than it does. This makes the tests less valuable for no gain.
In cases like the above, Test::Deep should raise an exception.
The text was updated successfully, but these errors were encountered:
I encountered this code at work, roughly:
This seems to the casual reader like it asserts that
$test_data
is a superhash of both of the given hashrefs tosuperhashof
. Instead, arguments after the first tosuperhashof
are silently discarded meaning that the test appears to assert more than it does. This makes the tests less valuable for no gain.In cases like the above, Test::Deep should raise an exception.
The text was updated successfully, but these errors were encountered: