Ticket #1122: literal.t.patch

File literal.t.patch, 1.6 KB (added by mgrimes, 12 years ago)
  • t/op/literal.t

     
    1 #!perl 
    2 # Copyright (C) 2001-2005, Parrot Foundation. 
     1#!parrot 
     2# Copyright (C) 2001-2009, Parrot Foundation. 
    33# $Id$ 
    44 
    5 use strict; 
    6 use warnings; 
    7 use lib qw( . lib ../lib ../../lib ); 
    8 use Test::More; 
    9 use Parrot::Test tests => 2; 
    10  
    115=head1 NAME 
    126 
    137t/op/literal.t - Testing the PIR and PASM lexer 
     
    3125 
    3226=cut 
    3327 
    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' 
    5030 
    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 
    6134.end 
    62 CODE 
    63 42 
    64 42 
    65 42 
    66 42 
    67 OUTPUT 
    6835 
     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 
    6943# Local Variables: 
    70 #   mode: cperl 
     44#   mode: pir 
    7145#   cperl-indent-level: 4 
    7246#   fill-column: 100 
    7347# End: 
    74 # vim: expandtab shiftwidth=4: 
     48# vim: expandtab shiftwidth=4 ft=pir: