A regression test

2 views
Skip to first unread message

Miroslav Silovic

unread,
May 11, 2005, 5:12:36 PM5/11/05
to perl6-c...@perl.org, Autrijus Tang
This is an addition to t/operators/hyper.t. It regression-checks for
the bug discussed on #perl6 (in a nutshell, hyper ops used to only
work on list literals, but not on array variables).

{ # regression test, ensure that hyper works on arrays
my @r1;
my @r2;
my @e1 = (2, 4, 6);
my @e2 = (2, 3, 4);
my @a = (1, 2, 3);
@r1 = @a >>+<< @a;
@r2 = @a >>+<< 1;
is(~@r1, ~@e1, "hyper op works on variables, too.");
is(~@r2, ~@e2, "hyper op and correctly promotes scalars");
};

Reply all
Reply to author
Forward
0 new messages