* examples/pasm/fact.pasm:
[parrot.git] / t / op / literal.t
blobb465abd6829a8200facbca087bc42c3af9c2b9c7
1 #!perl
2 # Copyright (C) 2001-2005, The Perl Foundation.
3 # $Id$
5 use strict;
6 use warnings;
7 use lib qw( . lib ../lib ../../lib );
8 use Test::More;
9 use Parrot::Test tests => 2;
11 =head1 NAME
13 t/op/literal.t - Testing the PIR and PASM lexer
15 =head1 SYNOPSIS
17         % prove t/op/literal.t
19 =head1 DESCRIPTION
21 Test lexing of literal numbers.
22 Taken from from the 2nd aoudad book (page 127).
24 =head1 TODO
26 More tests are welcome.
28 =head1 SEE ALSO
30 L<https://rt.perl.org/rt3/Ticket/Display.html?id=31197>
32 =cut
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
49 OUTPUT
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"
61 .end
62 CODE
67 OUTPUT
69 # Local Variables:
70 #   mode: cperl
71 #   cperl-indent-level: 4
72 #   fill-column: 100
73 # End:
74 # vim: expandtab shiftwidth=4: