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

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

From:
Nicholas Clark via perl5-changes
Date:
September 9, 2021 07:35
Subject:
[Perl/perl5] fe9494: More tests for assigning to keys %hash
Message ID:
Perl/perl5/push/refs/heads/blead/034242-fe9494@github.com
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: fe94940552b9317f87a124f70c0974d7850c40de
      https://github.com/Perl/perl5/commit/fe94940552b9317f87a124f70c0974d7850c40de
  Author: Nicholas Clark <nick@ccl4.org>
  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.)





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About