[svn:parrot] r40498 - in trunk: . t/pir
dukeleto at svn.parrot.org
dukeleto at svn.parrot.org
Wed Aug 12 06:51:42 UTC 2009
Author: dukeleto
Date: Wed Aug 12 06:51:40 2009
New Revision: 40498
URL: https://trac.parrot.org/parrot/changeset/40498
Log:
[t] Add some basic tests for PIR macros
Added:
trunk/t/pir/
trunk/t/pir/macro.t
Modified:
trunk/MANIFEST
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST Wed Aug 12 03:43:02 2009 (r40497)
+++ trunk/MANIFEST Wed Aug 12 06:51:40 2009 (r40498)
@@ -1823,6 +1823,7 @@
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]
Added: trunk/t/pir/macro.t
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/t/pir/macro.t Wed Aug 12 06:51:40 2009 (r40498)
@@ -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:
More information about the parrot-commits
mailing list