Permalink
Browse files

[t/spec] more autothreading tests (for .values and prefix:<+>)

git-svn-id: http://svn.pugscode.org/pugs@25412 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 94d1dc0 commit 147ede3f69e09618c31bad4c8d2d2e2777647064 moritz committed Feb 19, 2009
Showing with 13 additions and 1 deletion.
  1. +13 −1 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
@@ -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.