Skip to content

Commit ce3050e

Browse files
dogbert17zoffixznet
authored andcommitted
Tests added for duckmap (#162)
* Tests added for duckmap * Changed second test to the better. Zoffix++
1 parent 0ddea52 commit ce3050e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

S32-list/duckmap.t

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
use v6;
2+
3+
use Test;
4+
5+
plan 2;
6+
7+
=begin description
8+
9+
This test tests C<duckmap>.
10+
11+
=end description
12+
13+
{
14+
my $list = (1, (2,3), "a");
15+
is-deeply duckmap(-> Int $x { $x ~~ Int ?? $x !! Any }, $list), (1, (2, 3), 'a'), "duckmap doesn't hang"; # RT #129321
16+
#?rakudo todo "RT #129363 duckmap doesn't preserve structure types"
17+
is-deeply duckmap(-> Int $x { $x ~~ Int ?? $x !! Any }, [1, [2,3], 4]), [1, [2,3], 4]
18+
} #2
19+
20+
# vim: ft=perl6

0 commit comments

Comments
 (0)