Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
also test combinations function
  • Loading branch information
TimToady committed Aug 2, 2014
1 parent 357d2a9 commit dce5eab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion S32-list/combinations.t
@@ -1,6 +1,6 @@
use Test;

plan 6;
plan 7;

# L<S32::Containers/List/=item combinations>

Expand All @@ -11,3 +11,5 @@ ok [[1, 2, 3].combinations(3)] eqv [[1,2,3],], "three items of a three-item list
ok [[1, 2, 3].combinations(1..2)] eqv [[1], [2], [3], [1, 2], [1, 3], [2, 3]], "1..2 items";
ok [[1, 2, 3].combinations(0..3)] eqv [[], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]], "0..3 items";
ok [[1, 2, 3].combinations(2..3)] eqv [[1, 2], [1, 3], [2, 3], [1, 2, 3]], "2..3 items";

ok [combinations(3,2)] eqv [[0, 1], [0, 2], [1, 2]], "combinations function";

0 comments on commit dce5eab

Please sign in to comment.