Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[t] Add some basic tests for PIR macros
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
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: |