Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t/spec] Arity-0 test added.

git-svn-id: http://svn.pugscode.org/pugs@29919 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit acc54459952b60155c7a7ca78445f3a85f8f6311 1 parent 73e6bc8
colomon authored
Showing with 20 additions and 0 deletions.
  1. +18 −0 S03-operators/series-arity0.t
  2. +2 −0  S03-operators/series-simple.t
View
18 S03-operators/series-arity0.t
@@ -0,0 +1,18 @@
+use v6;
+use Test;
+
+# L<S03/List infix precedence/"the series operator">
+
+plan *;
+
+# some tests without regard to ending
+
+{
+ my @rolls = ({ (1..6).pick } ... *).batch(20);
+ is +@rolls, 20, 'Got the number of rolls we asked for';
+ is @rolls.grep(Int).elems, 20, 'all the rolls are Ints';
+ is @rolls.grep(1..6).elems, 20, 'all the rolls are in the Range 1..6';
+}
+
+
+done_testing;
View
2  S03-operators/series-simple.t
@@ -16,4 +16,6 @@ is (1, { $_ + 2 } ... *).batch(5).join(', '), '1, 3, 5, 7, 9', 'simple series wi
is (1, { 1 / ((1 / $_) + 1) } ... *).batch(5).map({.perl}).join(', '), '1, 1/2, 1/3, 1/4, 1/5', 'tricky series with one item and closure on the LHS';
+
+
done_testing;
Please sign in to comment.
Something went wrong with that request. Please try again.