Permalink
Browse files

Merge branch 'master' into boehm2

git-svn-id: https://svn.parrot.org/parrot/branches/boehm_gc_2@44463 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 9e861bd commit 28736b83a176e242d627f9682dfe5a0e1369748e bacek committed Feb 24, 2010
View
3 compilers/ncigen/t/NCIGENAST/struct_00.t
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
View
3 compilers/ncigen/t/NCIGENAST/typedef_00.t
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
View
5 compilers/ncigen/t/parse_00.t
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
@@ -122,7 +125,7 @@ int b = 12;
int a = 10 * sizeof(int) * 13;
CODE
-parse_success(<<'CODE', 'times_04.c').c;
+parse_success(<<'CODE', 'times_04.c');
int a = 8 * 3;
CODE
View
3 compilers/ncigen/t/parse_01.t
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
View
3 compilers/ncigen/t/parse_02.t
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
View
3 compilers/pirc/t/basic.t
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib qw(lib);
use Parrot::Test tests => 6;
View
3 compilers/pirc/t/heredoc.t
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib qw(lib);
use Parrot::Test tests => 1;
View
3 compilers/pirc/t/macro.t
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib qw(lib);
use Parrot::Test tests => 1;
View
3 compilers/pirc/t/stmts.t
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib qw(lib);
use Parrot::Test tests => 5;
View
3 compilers/pirc/t/subflags.t
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib qw(lib);
use Parrot::Test tests => 1;
View
13 config/init/hints/openbsd.pm
@@ -21,10 +21,17 @@ sub runstep {
if ( $libs !~ /-lpthread\b/ ) {
$libs .= ' -lpthread';
}
+
+ my $ldflags = $conf->data->get('ldflags');
+ if ( $ldflags !~ m|-L/usr/local/lib\b| ) {
+ $ldflags .= ' -L/usr/local/lib';
+ }
+
$conf->data->set(
- libs => $libs,
- link => 'g++',
- rpath => '-Wl,-R',
+ ldflags => $ldflags,
+ libs => $libs,
+ link => 'g++',
+ rpath => '-Wl,-R',
has_dynamic_linking => 1,
parrot_is_shared => 1,
View
14 docs/embed.pod
@@ -340,14 +340,6 @@ Call a Parrot subroutine using the supplied signature. Variables to be filled
with return values are passed as references in the varargs list, after all
arguments.
-=item [DEPRECATED] C<void *Parrot_call_sub(PARROT_INTERP, Parrot_PMC sub, const_char *signature)>
-
-Call a Parrot subroutine that returns a pointer using the supplied signature.
-
-=item [DEPRECATED] C<Parrot_Int Parrot_call_sub_ret_int(PARROT_INTERP, Parrot_PMC sub, const_char *signature)>
-
-Call a Parrot subroutine that returns an integer using the supplied signature.
-
=back
=head2 Objects
@@ -490,7 +482,7 @@ future.
sub = Parrot_find_global_cur(interp, pstr);
/* run foo(), which returns nothing */
- Parrot_call_sub(interp, sub, "v");
+ Parrot_ext_call(interp, sub, "->");
Parrot_destroy(interp);
@@ -587,10 +579,6 @@ The list may also be augmented if additional functionality is required.
=item C<Parrot_ext_call>
-=item [DEPRECATED] C<Parrot_call_sub>
-
-=item [DEPRECATED] C<Parrot_call_sub_ret_int>
-
=item C<Parrot_char_digit_value>
=item C<Parrot_charset_c_name>
View
4 examples/languages/abc/t/01-tests.t
@@ -79,7 +79,7 @@ my @test_files = map { "$abcdir/t/$_" } @files;
# calculate total number of tests
my $numtests = 0;
foreach my $f (@test_files) {
- open my( $TEST_FILE ), $f;
+ open my $TEST_FILE, '<', $f;
# for each line in the given files if it's not a comment line
# or an empty line, the it's a test
@@ -91,7 +91,7 @@ plan tests => $numtests;
# main loop
foreach my $file (@test_files) {
- open my $TEST_FILE, "<$file" or die "can't open file";
+ open my $TEST_FILE, '<', $file or die "can't open file";
while (<$TEST_FILE>) {
chomp;
s/\r//g;
View
2 ext/Parrot-Embed/lib/Parrot/Embed.xs
@@ -223,7 +223,7 @@ CODE:
pmc_actual = pmc->pmc;
interp = get_interp( pmc->interp );
arg_string = Parrot_str_new_constant( interp, argument );
- out_pmc = Parrot_call_sub( interp, pmc_actual, signature, arg_string );
+ Parrot_ext_call( interp, pmc_actual, signature, arg_string, &out_pmc );
RETVAL = make_pmc( aTHX_ pmc->interp, out_pmc );
OUTPUT:
RETVAL
View
14 ext/Parrot-Embed/t/pipp.t
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2008-2009, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
use strict;
@@ -33,8 +33,8 @@ my $pipp_x = $interp->find_global( 'Pipp' );
isa_ok( $pipp_x, 'Parrot::PMC' );
}
-# TODO: get hll id of Pipp
-# TODO: set hll namespace root to 'pipp'
+# todo: get hll id of Pipp
+# todo: set hll namespace root to 'pipp'
# find sub 'eval' and hll namespace 'pipp'
my $pipp_eval = $interp->find_global( 'pipp', 'eval' );
# isa_ok( $pipp_eval, 'Parrot::PMC', todo => '$pipp_eval is not found' );
@@ -73,3 +73,11 @@ if (0)
ok( $pmc, 'invoke() should return a PMC, given that signature' );
is( $pmc->get_string(), 42, 'value returned in the PMC' );
}
+
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
View
3 lib/Parrot/Pmc2c/PMC.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2008, Parrot Foundation.
+# Copyright (C) 2004-2010, Parrot Foundation.
# $Id$
#
@@ -340,7 +340,6 @@ sub vtable_method_does_multi {
my ( $self, $methodname ) = @_;
return 1 if ($methodname =~ m/^
- (?:i_)?
(?:add|subtract|multiply|divide|floor_divide|modulus)
(?:_int|_float)?
$/x);
View
34 src/dynpmc/gdbmhash.pmc
@@ -390,6 +390,40 @@ Deletes the element associated with C<*key>.
return;
}
+
+/*
+
+=back
+
+=head2 Specific Methods
+
+=over 4
+
+=item C<void open(STRING* value)>
+
+Open a or create a new dbm file.
+
+=cut
+
+*/
+
+ METHOD void open(STRING* value) {
+ VTABLE_set_string_native(interp, SELF, value);
+ }
+
+/*
+
+=item C<void close()>
+
+Close current dbm file.
+
+=cut
+
+*/
+
+ METHOD void close() {
+ gdbm_close(PMC_dbfh(SELF));
+ }
}
/*
View
12 src/pmc/oplib.pmc
@@ -8,7 +8,7 @@ src/pmc/oplib.pmc
=head1 DESCRIPTION
-Implements oplib VTABLEs.
+Implements oplib VTABLEs.
=cut
@@ -22,7 +22,7 @@ Implements oplib VTABLEs.
need to cache even a majority of the ~1300 ops. */
static PMC *OPLIB_PMC_INSTANCE;
static PMC *OPLIB_OPCODE_CACHE;
-pmclass OpLib singleton {
+pmclass OpLib {
void class_init() {
OPLIB_PMC_INSTANCE = NULL;
OPLIB_OPCODE_CACHE = NULL;
@@ -39,6 +39,7 @@ pmclass OpLib singleton {
VTABLE void init() {
if (OPLIB_OPCODE_CACHE == NULL)
OPLIB_OPCODE_CACHE = Parrot_pmc_new(INTERP, enum_class_Hash);
+ PObj_custom_mark_SET(SELF);
}
VTABLE void mark() {
@@ -82,13 +83,12 @@ pmclass OpLib singleton {
}
VTABLE PMC* get_pmc_keyed_int(INTVAL value) {
- if (value > interp->op_lib->op_count)
+ if ((UINTVAL)value > interp->op_lib->op_count)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"OpLib: Opcode index %d out of bounds", value);
else {
- const char * const name = interp->op_info_table[value].full_name;
- const INTVAL len = strlen(name);
- STRING * const newstr = Parrot_str_new(INTERP, name, len);
+ const char * const name = interp->op_info_table[value].full_name;
+ STRING * const newstr = Parrot_str_new(INTERP, name, 0);
return VTABLE_get_pmc_keyed_str(INTERP, SELF, newstr);
}
}
View
4 t/codingstd/c_cppcomments.t
@@ -60,9 +60,9 @@ sub check_cppcomments {
(?: ' (?: \\\\ | \\' | [^'] )* ' ) # remove ' string
| (?: " (?: \\\\ | \\" | [^"] )* " ) # remove " string
| /\* .*? \*/ # remove C comment
- | https?:\/\/ # TT # 414 quick fix
+ | https?:\/\/ # TT # 414 quick fix
)
- }{}gsx;
+ }{}gsx;
return $buf !~ m{ ( .*? // .* ) }x;
}
View
31 t/compilers/imcc/imcpasm/optc.t
@@ -307,22 +307,9 @@ CODE
i 1 j 3 k 2
OUT
-sub permute (&@) {
- my $code = shift;
- my @idx = 0 .. $#_;
- while ( $code->( @_[@idx] ) ) {
- my $p = $#idx;
- --$p while $idx[ $p - 1 ] > $idx[$p];
- my $q = $p or return;
- push @idx, reverse splice @idx, $p;
- ++$q while $idx[ $p - 1 ] > $idx[$q];
- @idx[ $p - 1, $q ] = @idx[ $q, $p - 1 ];
- }
-}
-
my @array = ( 'i', 'j', 'k' );
my @b;
-permute { push @b, "@_" } @array;
+my_permute( sub { push @b, "@_" }, @array );
my $x;
my $y;
foreach $x (@b) {
@@ -356,7 +343,7 @@ OUT
undef @b;
@array = ( 'i', 'j', 'k', 'l' );
-permute { push @b, "@_" } @array;
+my_permute( sub { push @b, "@_" }, @array );
foreach $x (@b) {
$x =~ tr/ /,/;
$y = $x;
@@ -392,7 +379,7 @@ OUT
undef @b;
@array = ( 'i', 'j' );
-permute { push @b, "@_" } @array;
+my_permute( sub { push @b, "@_" }, @array );
foreach $x (@b) {
$x =~ tr/ /,/;
$y = $x;
@@ -419,6 +406,18 @@ $y
OUT
}
+sub my_permute {
+ my $code = shift;
+ my @idx = 0 .. $#_;
+ while ( $code->( @_[@idx] ) ) {
+ my $p = $#idx;
+ --$p while $idx[ $p - 1 ] > $idx[$p];
+ my $q = $p or return;
+ push @idx, reverse splice @idx, $p;
+ ++$q while $idx[ $p - 1 ] > $idx[$q];
+ @idx[ $p - 1, $q ] = @idx[ $q, $p - 1 ];
+ }
+}
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
View
2 t/compilers/imcc/reg/spill_old.t
@@ -1,6 +1,6 @@
#!perl
# Copyright (C) 2001-2008, Parrot Foundation.
-# $Id: spill.t 37201 2009-03-08 12:07:48Z fperrad $
+# $Id$
use strict;
use warnings;
View
9 t/compilers/imcc/syn/hll.t
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2008, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
use strict;
@@ -81,3 +81,10 @@ CODE
Stack
OUT
}
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
View
4 t/compilers/pct/past.t
@@ -72,9 +72,9 @@ Integer
}
OUT
-## TODO: test that return() is taken from the type of value when not specified
+## TT #1476: test that return() is taken from the type of value when not specified
-## TODO: check the rest of the PAST::Var attributes
+## TT #1476: check the rest of the PAST::Var attributes
pir_output_is( <<'CODE', <<'OUT', 'dump PAST::Var node in visual format' );
.sub _main :main
load_bytecode 'PCT.pbc'
View
9 t/distro/meta_yml.t
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2008, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -30,3 +30,10 @@ eval "use Test::CPAN::Meta 0.08";
plan skip_all => "Test::CPAN::Meta 0.08 required for testing META.yml" if $@;
meta_yaml_ok();
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
View
61 t/dynpmc/gdbmhash.t
@@ -48,7 +48,17 @@ Tests the C<GDBMHash> PMC.
.sub unlink
.param string filename
new $P0, 'OS'
+ push_eh _handler
$P0.'rm'(filename)
+ .return ()
+ _handler:
+ .local pmc e
+ .get_results (e)
+ printerr "# Cannot unlink "
+ printerr filename
+ printerr " ("
+ printerr e
+ printerr ")\n"
.end
.sub test_typeof
@@ -118,6 +128,7 @@ Tests the C<GDBMHash> PMC.
hash_size = hash_1
is(hash_size, 13, 'After 15 assignments and 2 deletes GDBMHash has size 13')
+ hash_1."close"()
unlink('gdbm_hash_1')
.end
@@ -130,7 +141,7 @@ Tests the C<GDBMHash> PMC.
ok(1, 'An uninitialized GDBMHash is not')
HASH1_IS_1:
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_2"
if hash_1 goto HASH1_IS_2
ok(1, 'A GDBMHash for a new file is not')
HASH1_IS_2:
@@ -141,7 +152,8 @@ HASH1_IS_2:
HASH1_IS_3:
ok(1, 'After one insert the GDBMHash is')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_2')
.end
# The value is a STRING, with umlaut
@@ -151,7 +163,7 @@ HASH1_IS_3:
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_3"
.local pmc val_pmc
@@ -168,7 +180,8 @@ HASH1_IS_3:
val_pmc = hash_1["Schluessel"]
is(val_pmc, 'Wert urspruenglich', 'modify an entry')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_3')
.end
# The value is a STRING.
@@ -178,7 +191,7 @@ HASH1_IS_3:
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_4"
hash_1["Schluessel"] = "Wert"
@@ -197,7 +210,8 @@ HASH1_IS_3:
exist_flag = exists hash_1[key_out]
is(exist_flag, 1, 'exists keyed')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_4')
.end
# The value is a STRING.
@@ -207,7 +221,7 @@ HASH1_IS_3:
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_5"
hash_1["Schluessel"] = "Wert"
@@ -226,7 +240,8 @@ HASH1_IS_3:
val_pmc = hash_1[key_out]
is(val_pmc, 'Wert', 'set string with string key')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_5')
.end
# The value is a STRING.
@@ -236,7 +251,7 @@ HASH1_IS_3:
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_6"
.local pmc key_pmc
key_pmc = new 'String'
@@ -258,7 +273,8 @@ HASH1_IS_3:
val_pmc = hash_1[key2]
is(val_pmc, 'Wert', 'set string with pmc key')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_6')
.end
# The value is a PMC.
@@ -268,7 +284,7 @@ HASH1_IS_3:
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_7"
.local pmc val
val = new 'String'
@@ -290,7 +306,8 @@ HASH1_IS_3:
val_pmc = hash_1[key_out]
is(val_pmc, 'Wert', 'set pmc with string key')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_7')
.end
# The value is a PMC.
@@ -300,7 +317,7 @@ HASH1_IS_3:
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_8"
.local pmc val
val = new 'String'
@@ -325,7 +342,8 @@ HASH1_IS_3:
val_pmc = hash_1[key2]
is(val_pmc, 'Wert', 'set pmc with pmc key')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_8')
.end
# The value is an INTVAL
@@ -335,7 +353,7 @@ HASH1_IS_3:
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_9"
hash_1["Schluessel"] = -11012005
@@ -354,7 +372,8 @@ HASH1_IS_3:
val_pmc = hash_1[key_out]
is(val_pmc, -11012005, 'set intval with a string key')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_9')
.end
# The value is a FLOATVAL.
@@ -364,7 +383,7 @@ HASH1_IS_3:
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_10"
.local pmc key_pmc
key_pmc = new 'String'
@@ -386,15 +405,16 @@ HASH1_IS_3:
val_pmc = hash_1[key2]
is(val_pmc, -1101.2005, 'set float with a pmc key')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_10')
.end
.sub test_delete_keyed
.local pmc gdbmhash_lib
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_11"
.local int exist_flag
.local int hash_size
@@ -410,7 +430,8 @@ HASH1_IS_3:
exist_flag = exists hash_1["a"]
is(exist_flag, 0, 'delete keyed')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_11')
.end
# Local Variables:
View
9 t/dynpmc/rational.t
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2008, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
use strict;
@@ -658,3 +658,10 @@ CODE
-1
1
OUTPUT
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
View
2 t/examples/pod.t
@@ -74,7 +74,7 @@ sub compile_ok {
my $todo = 0;
$todo = 1 if ($snippet->{modifier} =~ /TODO|INVALID/);
TODO: {
- # conditionally TODO the file.
+ # conditionally todo the file.
local $TODO = 'invalid code' if $todo;
is ($error_output,'',$description);
View
2 t/native_pbc/integer.t
@@ -90,7 +90,7 @@ sub this_arch {
. "_"
. (substr($PConfig{byteorder},0,2) eq '12' ? "le" : "be");
}
-sub bc_version($) {
+sub bc_version {
my $f = shift;
my $b;
open my $F, "<", "$f" or return "Can't open $f: $!";
View
2 t/native_pbc/number.t
@@ -132,7 +132,7 @@ sub this_arch {
. "_"
. (substr($PConfig{byteorder},0,2) eq '12' ? "le" : "be");
}
-sub bc_version($) {
+sub bc_version {
my $f = shift;
my $b;
open my $F, "<", "$f" or return "Can't open $f: $!";
View
2 t/native_pbc/string.t
@@ -58,7 +58,7 @@ sub this_arch {
. "_"
. (substr($PConfig{byteorder},0,2) eq '12' ? "le" : "be");
}
-sub bc_version($) {
+sub bc_version {
my $f = shift;
my $b;
open my $F, "<", "$f" or return "Can't open $f: $!";
View
5 t/oo/new-old.t
@@ -58,7 +58,8 @@ ok #test exception from init vtable
OUT
# Local Variables:
-# mode: pir
+# mode: cperl
+# cperl-indent-level: 4
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 ft=pir:
+# vim: expandtab shiftwidth=4:
View
13 t/op/calling.t
@@ -1406,9 +1406,14 @@ CODE
ok
OUTPUT
-my @todo = ( todo => 'broken with JIT (TT #983)' )
- if ( defined $ENV{TEST_PROG_ARGS} and
- $ENV{TEST_PROG_ARGS} =~ /--runcore=jit/ );
+my @todo = (
+ defined $ENV{TEST_PROG_ARGS}
+ and
+ $ENV{TEST_PROG_ARGS} =~ /--runcore=jit/
+)
+ ? ( todo => 'broken with JIT (TT #983)' )
+ : ();
+
pir_output_is( <<'CODE', <<'OUTPUT', "clone_key_arg", @todo );
.sub main :main
foo()
@@ -2461,7 +2466,7 @@ foo
OUTPUT
# See Rakudo queue http://rt.perl.org/rt3/Ticket/Display.html?id=62730
-pir_output_is( <<'CODE', <<'OUTPUT', "Handling :flat of emtpy arguments" );
+pir_output_is( <<'CODE', <<'OUTPUT', "Handling :flat of empty arguments" );
.sub 'main'
$P0 = new ['Undef']
($P0) = foo()
View
3 t/op/exit.t
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
use strict;
@@ -65,6 +65,7 @@ TODO: {
pbc_exit_code_is($pbc, 0, 'pbc exits with 0 by default');
}
+# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
View
11 t/op/sysinfo.t
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2008, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
# initial work by Brad Gilbert b2gills <at> gmail <dot> com
@@ -142,7 +142,7 @@ CODE
print S1
end
CODE
- } # END TODO block
+ } # END todo block
} # END inner SKIP block
} # END outer SKIP block
@@ -174,3 +174,10 @@ SKIP:
.end
CODE
}
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
View
10 t/perl/Parrot_IO.t
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
@@ -40,9 +40,9 @@ to ensure nothing is broken.
BEGIN { use_ok('Parrot::IO::Path') }
my $file_temp_work_path = tempdir(
- 'PARROT_IO_XXXX',
- TMPDIR => 1,
- CLEANUP => 1
+ 'PARROT_IO_XXXX',
+ TMPDIR => 1,
+ CLEANUP => 1
);
# you can sort of count on the var below being the unique part of the temp dir
my $file_temp_dir = (splitdir($file_temp_work_path))[-1];
@@ -89,7 +89,7 @@ isa_ok( $r, 'Parrot::IO::Directory' );
ok( !$r->parent(), 'root has no parent' );
my $d = Parrot::IO::Directory->tmp_directory(
- catfile($file_temp_dir, 't')
+ catfile($file_temp_dir, 't')
);
ok( $d, 'tmp_directory' );
View
2 t/pmc/exporter.t
@@ -405,7 +405,7 @@ CODE
ok 1
OUT
-# TODO: Test exporting mmd subs: TT #1205
+# Test exporting mmd subs: TT #1205
# https://trac.parrot.org/parrot/ticket/1205
# Local Variables:
View
2 t/pmc/iterator.t
@@ -23,7 +23,7 @@ Tests the C<Iterator> PMC.
=cut
-# XXX Split this test into aggregate specific one.
+# TT #1478: Split this test into aggregate specific one.
pasm_output_is( <<'CODE', <<'OUTPUT', "new iter" );
new P2, ['ResizablePMCArray']
View
27 t/pmc/multidispatch.t
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
@@ -9,7 +9,7 @@ use lib qw( . lib ../lib ../../lib );
use Test::More;
use Parrot::Test::Util 'create_tempfile';
-use Parrot::Test tests => 45;
+use Parrot::Test tests => 46;
=head1 NAME
@@ -1493,6 +1493,29 @@ GoodbyeTa ta2
77.788.899.9
OUTPUT
+pir_output_is( <<'CODE', <<'OUTPUT', 'Integer subclass and MMD - TT #784' );
+.sub main :main
+ .local pmc int_c
+ int_c = get_class "Integer"
+
+ .local pmc sub_c
+ sub_c = subclass int_c, "MyInt"
+
+ $P1 = new 'Integer'
+ $P1 = 4
+ $P1 -= 3
+ say $P1
+
+ $P1 = new 'MyInt'
+ $P1 = 4
+ $P1 -= 3
+ say $P1
+.end
+CODE
+1
+1
+OUTPUT
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
View
13 t/pmc/sub.t
@@ -27,6 +27,8 @@ C<Continuation> PMCs.
=cut
+my @todo;
+
pasm_output_is( <<'CODE', <<'OUTPUT', "PASM subs - invokecc" );
.const 'Sub' P0 = "func"
@@ -835,9 +837,14 @@ the_sub
main
OUTPUT
-my @todo = ( todo => 'broken with JIT (TT #983)' )
- if ( defined $ENV{TEST_PROG_ARGS} and
- $ENV{TEST_PROG_ARGS} =~ /--runcore=jit/ );
+@todo = (
+ defined $ENV{TEST_PROG_ARGS}
+ and
+ $ENV{TEST_PROG_ARGS} =~ /--runcore=jit/
+)
+ ? ( todo => 'broken with JIT (TT #983)' )
+ : ();
+
pir_output_is( <<'CODE', <<'OUTPUT', "caller introspection via interp", @todo );
.sub main :main
.include "interpinfo.pasm"
View
18 t/steps/auto/snprintf-01.t
@@ -35,24 +35,6 @@ my $serialized = $conf->pcfreeze();
$conf->options->set(%{$args});
my $step = test_step_constructor_and_description($conf);
-# The test of runstep() below will need to be TODO-ed until such time as
-# we can test with all the data which the Parrot::Configure object would
-# normally have during regular configuration at the onset of this step.
-# That's because runstep() consists almost solely of calls to C
-# programs. We can't refactor runstep()'s guts out into internal
-# subroutines and test them explicitly as we've been able to do for
-# other configuration steps. We won't lose any coverage by commenting
-# out the TODO block for the time being, as the coverage analysis will,
-# at the very least, pick up runstep() while running the step itself.
-#
-#TODO: {
-# # http://rt.perl.org/rt3/Ticket/Display.html?id=47391
-# local $TODO =
-# q<Reported failing where vendor-supplied Perl 5 Config.pm does not match true state of system available for Parrot configuration>;
-# ok($step->runstep($conf), "runstep() returned true value");
-#} #'
-
-
$conf->replenish($serialized);
########## _evaluate_snprintf() ##########
View
9 t/tools/ops2pm/05-renum_op_map_file.t
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2007-2008, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
# 05-renum_op_map_file.t
@@ -127,3 +127,10 @@ sub get_last_opcode {
return ($lastcode, $lastnumber);
}
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
+
View
15 t/tools/ops2pm/08-sort_ops.t
@@ -177,17 +177,12 @@ ok( chdir $main::topdir, "Positioned at top-level Parrot directory" );
\$stderr
);
ok($ret, "sort_ops returned successfully" );
-# TODO: {
-# local $TODO = 'broken warning about experimental ops';
- like(
- $stderr,
- qr|experimental, not in ops\.num|,
- "Got expected warning about experimental ops"
- );
-# }
-
- # To do: Test that the sorting was correct.
+ like(
+ $stderr,
+ qr|experimental, not in ops\.num|,
+ "Got expected warning about experimental ops"
+ );
ok( chdir $cwd, 'changed back to starting directory after testing' );
}

0 comments on commit 28736b8

Please sign in to comment.