Ticket #1122: literal.t.patch
File literal.t.patch, 1.6 KB (added by mgrimes, 12 years ago) |
---|
-
t/op/literal.t
1 #!p erl2 # Copyright (C) 2001-200 5, Parrot Foundation.1 #!parrot 2 # Copyright (C) 2001-2009, Parrot Foundation. 3 3 # $Id$ 4 4 5 use strict;6 use warnings;7 use lib qw( . lib ../lib ../../lib );8 use Test::More;9 use Parrot::Test tests => 2;10 11 5 =head1 NAME 12 6 13 7 t/op/literal.t - Testing the PIR and PASM lexer … … 31 25 32 26 =cut 33 27 34 pasm_output_is( <<'CODE', <<'OUTPUT', "integer literals in PASM" ); 35 print 0x2A 36 print "\n" 37 print 0X2A 38 print "\n" 39 print 0b101010 40 print "\n" 41 print 0B101010 42 print "\n" 43 end 44 CODE 45 42 46 42 47 42 48 42 49 OUTPUT 28 .sub main :main 29 .include 'test_more.pir' 50 30 51 pir_output_is( <<'CODE', <<'OUTPUT', "integer literals in PIR" ); 52 .sub test :main 53 print 0x2A 54 print "\n" 55 print 0X2A 56 print "\n" 57 print 0b101010 58 print "\n" 59 print 0B101010 60 print "\n" 31 plan(4) 32 test_integer_literals_in_pasm() 33 # END_OF_TESTS 61 34 .end 62 CODE63 4264 4265 4266 4267 OUTPUT68 35 36 .sub test_integer_literals_in_pasm 37 is( 0x2A, 42, 'Integer literals in PIR' ) 38 is( 0X2A, 42, 'Integer literals in PIR' ) 39 is( 0b101010, 42, 'Integer literals in PIR' ) 40 is( 0B101010, 42, 'Integer literals in PIR' ) 41 .end 42 69 43 # Local Variables: 70 # mode: cperl44 # mode: pir 71 45 # cperl-indent-level: 4 72 46 # fill-column: 100 73 47 # End: 74 # vim: expandtab shiftwidth=4 :48 # vim: expandtab shiftwidth=4 ft=pir: