Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[GH #935] add t/stress/gc.t

use from cmd-line as ./parrot t/stress/gc_2.pir 1000000
ulimit -Sv 64000
./parrot t/stress/gc_3.pir 1000000
ulimit -Sv unlimited
  • Loading branch information...
commit 1b0620f2d1e09277e055c974c2d8c26cc055db58 1 parent 2c4e32b
Reini Urban rurban authored
Showing with 46 additions and 2 deletions.
  1. +46 −2 t/stress/gc.t
48 t/stress/gc.t
View
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2003, Parrot Foundation.
+# Copyright (C) 2001-2013, Parrot Foundation.
=head1 NAME
@@ -19,7 +19,7 @@ use strict;
use warnings;
use lib qw(lib . ../lib ../../lib);
-use Parrot::Test tests => 1;
+use Parrot::Test tests => 3;
use Test::More;
use Parrot::PMC qw(%pmc_types);
@@ -33,6 +33,50 @@ starting
ending
OUTPUT
+pir_output_is( <<'CODE', <<'OUTPUT', "GC stress" );
+.sub 'main' :main
+ .param pmc args
+
+ $I0 = 0
+ .local int N
+ N = args[1]
+ if N <= 0 goto loop
+ N = 10000
+
+ loop:
+ unless $I0 < N goto done
+ $P0 = new ['ResizablePMCArray']
+ inc $I0
+ goto loop
+ done:
+.end
+CODE
+OUTPUT
+
+pir_output_is( <<'CODE', <<'OUTPUT', "GC subs" );
+.sub 'main' :main
+ .param pmc args
+
+ $I0 = 0
+ .local int N
+ N = args[1]
+ if N <= 0 goto loop
+ N = 10000
+
+ loop:
+ unless $I0 < N goto done
+ 'no-op'()
+ inc $I0
+ goto loop
+ done:
+.end
+
+.sub 'no-op'
+ noop
+.end
+CODE
+OUTPUT
+
1;
# Local Variables:
Please sign in to comment.
Something went wrong with that request. Please try again.