develooper Front page | perl.perl5.changes | Postings from September 2021

[Perl/perl5] fe9494: More tests for assigning to keys %hash

Nicholas Clark via perl5-changes
September 9, 2021 07:35
[Perl/perl5] fe9494: More tests for assigning to keys %hash
Message ID:
  Branch: refs/heads/blead
  Commit: fe94940552b9317f87a124f70c0974d7850c40de
  Author: Nicholas Clark <>
  Date:   2021-09-08 (Wed, 08 Sep 2021)

  Changed paths:
    M t/op/each.t

  Log Message:
  More tests for assigning to keys %hash

Change some calls from is()/isnt() to cmp_ok() to confirm that values
change in the expected direction, rather than merely being "different".

Re-order some calls to is()/cmp_ok() so that the "expected" value is second.

Don't assume that a hash can always hold `num_buckets()/2` keys.
(The test had previously assumed that assigning this value to keys wouldn't
change the hash size. Instead use the current number of keys, as clearly
the hash is already holding that many keys.) Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About