diff options
author | Zefram <zefram@fysh.org> | 2017-12-17 11:02:23 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2017-12-17 11:02:23 +0000 |
commit | da4e040f42421764ef069371d77c008e6b801f45 (patch) | |
tree | dad219b9c5a660c14705b6544fab2b3572bc2bd9 /ext/XS-APItest | |
parent | b2cd5cb1d8b3c8a7a7f033784d5134d2fbd8cad8 (diff) | |
parent | d6374f3d794e2a640258023e92e8d922409215ec (diff) | |
download | perl-da4e040f42421764ef069371d77c008e6b801f45.tar.gz |
merge branch zefram/dumb_match
Diffstat (limited to 'ext/XS-APItest')
-rw-r--r-- | ext/XS-APItest/t/fetch_pad_names.t | 5 | ||||
-rw-r--r-- | ext/XS-APItest/t/grok.t | 25 |
2 files changed, 11 insertions, 19 deletions
diff --git a/ext/XS-APItest/t/fetch_pad_names.t b/ext/XS-APItest/t/fetch_pad_names.t index bdff1a8fe6..7670e9b3af 100644 --- a/ext/XS-APItest/t/fetch_pad_names.t +++ b/ext/XS-APItest/t/fetch_pad_names.t @@ -321,11 +321,10 @@ sub general_tests { $tests->{pad_size}{invariant}{msg}; for my $var (@{$tests->{vars}}) { - no warnings 'experimental::smartmatch'; if ($var->{type} eq 'ok') { - ok $var->{name} ~~ $names_av, $var->{msg}; + ok +(grep { $_ eq $var->{name} } @$names_av), $var->{msg}; } else { - ok !($var->{name} ~~ $names_av), $var->{msg}; + ok !(grep { $_ eq $var->{name} } @$names_av), $var->{msg}; } } diff --git a/ext/XS-APItest/t/grok.t b/ext/XS-APItest/t/grok.t index 810ffaed5f..b6ad905b60 100644 --- a/ext/XS-APItest/t/grok.t +++ b/ext/XS-APItest/t/grok.t @@ -4,7 +4,6 @@ use strict; use Test::More; use Config; use XS::APItest; -use feature 'switch'; no warnings 'experimental::smartmatch'; use constant TRUTH => '0 but true'; @@ -31,21 +30,15 @@ foreach my $leader ('', ' ', ' ') { { my (@UV, @NV); - given ($Config{ivsize}) { - when (4) { - @UV = qw(429496729 4294967290 4294967294 4294967295); - @NV = qw(4294967296 4294967297 4294967300 4294967304); - } - when (8) { - @UV = qw(1844674407370955161 18446744073709551610 - 18446744073709551614 18446744073709551615); - @NV = qw(18446744073709551616 18446744073709551617 - 18446744073709551620 18446744073709551624); - } - default { - die "Unknown IV size $_"; - } - } + if ($Config{ivsize} == 4) { + @UV = qw(429496729 4294967290 4294967294 4294967295); + @NV = qw(4294967296 4294967297 4294967300 4294967304); + } elsif ($Config{ivsize} == 8) { + @UV = qw(1844674407370955161 18446744073709551610 + 18446744073709551614 18446744073709551615); + @NV = qw(18446744073709551616 18446744073709551617 + 18446744073709551620 18446744073709551624); + } else { die "Unknown IV size $Config{ivsize}" } foreach (@UV) { my $string = $leader . $_ . $trailer; my ($flags, $value) = grok_number($string); |