@@ -5,17 +5,18 @@ plan 9;
5
5
6
6
# L<S32::Containers/List/=item permutations>
7
7
8
- is (1 , 2 , 3 ). permutations. list. perl , ((1 , 2 , 3 ), (1 , 3 , 2 ), (2 , 1 , 3 ), (2 , 3 , 1 ), (3 , 1 , 2 ), (3 , 2 , 1 )). perl , " permutations method" ;
9
- is permutations(3 ). list. perl , ((0 , 1 , 2 ), (0 , 2 , 1 ), (1 , 0 , 2 ), (1 , 2 , 0 ), (2 , 0 , 1 ), (2 , 1 , 0 )). perl , " permutations function" ;
8
+ is-deeply (1 , 2 , 3 ). permutations,
9
+ ((1 , 2 , 3 ), (1 , 3 , 2 ), (2 , 1 , 3 ), (2 , 3 , 1 ), (3 , 1 , 2 ), (3 , 2 , 1 )). Seq , ' permutations method' ;
10
+ is-deeply permutations(3 ),
11
+ ((0 , 1 , 2 ), (0 , 2 , 1 ), (1 , 0 , 2 ), (1 , 2 , 0 ), (2 , 0 , 1 ), (2 , 1 , 0 )). Seq , ' permutations function' ;
10
12
11
- is (1 ,). permutations. list. perl , ((1 ,),). perl , " permutations method on single element list" ;
12
- is permutations(1 ). list. perl , ((0 ,),). perl , " permutations function with 1 for its argument" ;
13
+ is-deeply (1 ,). permutations, ((1 ,),). Seq , ' method on single-element list' ;
14
+ is-deeply () . permutations, ((),) . Seq , ' method on empty list' ;
15
+ is-deeply permutations(1 ), ((0 ,),). Seq , ' sub with 1 for its argument' ;
16
+ is-deeply permutations(0 ), ((),) . Seq , ' sub with 0 for its argument' ;
13
17
14
- is (). permutations. list. perl , ((),). perl , " permutations method on empty list" ;
15
- is permutations(0 ). list. perl , ((),). perl , " permutations function with 0 for its argument" ;
16
-
17
- is + (). permutations, 1 , " there is 1 permutation of empty list" ;
18
- is + permutations(0 ), 1 , " there is 1 permutation with 0 values" ;
18
+ is-deeply + (). permutations, 1 , ' there is 1 .permutation of empty list' ;
19
+ is-deeply + permutations(0 ), 1 , ' there is 1 &permutation with 0 values' ;
19
20
20
21
# RT #127777
21
- is permutations(-1 ). list . perl , ((),). perl , " sub permutations with negative argument" ;
22
+ is-deeply permutations(-1 ), ((),). Seq , ' & permutations with negative argument' ;
0 commit comments