summaryrefslogtreecommitdiff
path: root/t/pragma/warn/util
diff options
context:
space:
mode:
Diffstat (limited to 't/pragma/warn/util')
-rw-r--r--t/pragma/warn/util57
1 files changed, 2 insertions, 55 deletions
diff --git a/t/pragma/warn/util b/t/pragma/warn/util
index 87d43e8ffc..605b42a771 100644
--- a/t/pragma/warn/util
+++ b/t/pragma/warn/util
@@ -3,25 +3,18 @@
Illegal octal digit ignored
my $a = oct "029" ;
- Illegal hexadecimal digit ignored
+ Illegal hex digit ignored
my $a = hex "0xv9" ;
Illegal binary digit ignored
my $a = oct "0b9" ;
-
- Mandatory Warnings
- ------------------
- Integer overflow in binary number
- Integer overflow in octal number
- Integer overflow in hex number
-
__END__
# util.c
use warning 'octal' ;
my $a = oct "029" ;
no warning 'octal' ;
-my $b = oct "029" ;
+my $a = oct "029" ;
EXPECT
Illegal octal digit '9' ignored at - line 3.
########
@@ -40,49 +33,3 @@ no warning 'unsafe' ;
*a = oct "0b9" ;
EXPECT
Illegal binary digit '9' ignored at - line 3.
-########
-# util.c
-$^W = 1 ;
-sub make_bin { "1" x $_[0] }
-$n = make_bin(33);
-{
- use warning 'unsafe' ;
- my $a = oct "0b$n" ;
- no warning 'unsafe' ;
- my $b = oct "0b$n" ;
-}
-my $c = oct "0b$n" ;
-EXPECT
-Binary number > 0b11111111111111111111111111111111 non-portable at - line 7.
-Binary number > 0b11111111111111111111111111111111 non-portable at - line 11.
-########
-# util.c
-$^W = 1 ;
-sub make_oct { ("","1","3")[$_[0]%3] . "7" x int($_[0]/3) }
-$n = make_oct(33);
-{
- use warning 'unsafe' ;
- my $a = oct "$n" ;
- no warning 'unsafe' ;
- my $b = oct "$n" ;
-}
-my $c = oct "$n" ;
-EXPECT
-Octal number > 037777777777 non-portable at - line 7.
-Octal number > 037777777777 non-portable at - line 11.
-########
-# util.c
-$^W = 1 ;
-sub make_hex { ("","1","3","7")[$_[0]%4] . "f" x int($_[0]/4) }
-$n = make_hex(33);
-{
- use warning 'unsafe' ;
- my $a = hex "$n" ;
- no warning 'unsafe' ;
- my $b = hex "$n" ;
-}
-my $c = hex "$n" ;
-EXPECT
-Hexadecimal number > 0xffffffff non-portable at - line 7.
-Hexadecimal number > 0xffffffff non-portable at - line 11.
-