Skip to content

Commit

Permalink
[t] Add new test to Task PMC [4]
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandobrito committed Dec 31, 2010
1 parent b9b6a9f commit 27625da
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion t/pmc/task.t
Expand Up @@ -5,7 +5,7 @@ use strict;
use warnings;
use lib qw( . lib ../lib ../../lib );
use Test::More;
use Parrot::Test tests => 5;
use Parrot::Test tests => 6;

=head1 NAME
Expand Down Expand Up @@ -109,6 +109,31 @@ CODE
/Task initializer must be a Hash/
OUTPUT

pir_output_is( <<'CODE', <<'OUTPUT', "set_string_native set type of task" );
.sub main :main
$P0 = new ['Task']
$P1 = getattribute $P0, 'type'
say $P1
$P2 = new ['String']
$P2 = "new_type"
setattribute $P0, 'type', $P2
$P1 = getattribute $P0, 'type'
say $P1
$P0 = "newer_type"
$P1 = getattribute $P0, 'type'
say $P1
.end
CODE

new_type
newer_type
OUTPUT

pir_output_is( <<'CODE', <<'OUT', 'create a task and set attributes in init' );
.sub main :main
.local pmc data
Expand Down

0 comments on commit 27625da

Please sign in to comment.