Skip to content

Commit

Permalink
[t/spec] more autothreading tests (for .values and prefix:<+>)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@25412 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Feb 19, 2009
1 parent 94d1dc0 commit 147ede3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion S03-junctions/autothreading.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 51;
plan 55;

{
# Solves the equatioin A + B = A * C for integers
Expand Down Expand Up @@ -201,3 +201,15 @@ plan 51;
$x.b('a' | 'b' | 'c');
is JuncInvTest2.cnt, 6, 'auto-threading over invocant and parameters works';
}

# test that various things autothread

{
my Junction $j = [1, 2] | 5;
is +$j.values.eigenstates, 3 '([1, 2] | 3).values has three eigenstates';

#?rakudo 3 skip 'autothreading of prefix:<+>'
ok ?( +$j == 5 ), 'prefix:<+> autothreads (1)';
ok ?( +$j == 2 ), 'prefix:<+> autothreads (2)';
ok !( +$j == 3 ), 'prefix:<+> autothreads (3)';
}

0 comments on commit 147ede3

Please sign in to comment.