Skip to content

Commit

Permalink
[t] Add some basic tests for PIR macros
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@40498 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
dukeleto committed Aug 12, 2009
1 parent daf7d1b commit 2c7da35
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions MANIFEST
Expand Up @@ -1823,6 +1823,7 @@ t/perl/README []doc
t/perl/testlib/answer.pir [test]
t/perl/testlib/hello [test]
t/perl/testlib/hello.pasm [test]
t/pir/macro.t [test]
t/pharness/01-default_tests.t [test]
t/pharness/02-get_test_prog_args.t [test]
t/pharness/03-handle_long_options.t [test]
Expand Down
43 changes: 43 additions & 0 deletions t/pir/macro.t
@@ -0,0 +1,43 @@
#! parrot
# Copyright (C) 2001-2009, Parrot Foundation.
# $Id$

=head1 NAME

t/pir/macro.t - Tests for macros in PIR

=head1 SYNOPSIS

% prove t/pir/macro.t

=head1 DESCRIPTION

Tests for macros in PIR.

=cut

.macro foo()
ok(1, 'basic macro')
.endm

.macro bar(x)
ok(x, 'basic macro with argument')
.endm

.macro_const PI_APPROX 4

.sub main :main
.include 'test_more.pir'
.local int x
plan(3)
.foo()
.bar(42)
is(.PI_APPROX, 4, '.macro_const')
.end

# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 filetype=pir:

0 comments on commit 2c7da35

Please sign in to comment.