This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate CPAN release of version.pm 0.9905
[perl5.git] / cpan / Math-Complex / t / underbar.t
1 #
2 # Tests that the standard Perl 5 functions that we override
3 # that operate on the $_ will work correctly [perl #62412]
4 #
5
6 use Test::More;
7
8 my @f = qw(abs cos exp log sin sqrt);
9
10 plan tests => scalar @f;
11
12 use strict;
13
14 use Math::Complex;
15
16 my %CORE;
17
18 for my $f (@f) {
19     local $_ = 0.5;
20     $CORE{$f} = eval "CORE::$f";
21 }
22
23 for my $f (@f) {
24     local $_ = 0.5;
25     is(eval "Math::Complex::$f", $CORE{$f}, $f);
26 }
27