Debian Codegraph @

t/02maybe.t

raw symbols SCIP
1 use Test::More tests => 3;
2 use PerlX::Maybe::XS;
3
4 is_deeply(
5 [ maybe foo => undef, maybe bar => 0, maybe baz => 1, undef ],
6 [ bar => 0, baz => 1, undef ],
7 );
8
9 is_deeply(
10 [ 3, maybe foo => undef, 4, maybe bar => 0, 5, maybe baz => 1 ],
11 [ 3, 4, bar => 0, 5, baz => 1 ],
12 );
13
14 is_deeply(
15 [ 3, maybe foo => {quux=>1}, undef, 4, maybe bar => 0, 5, maybe baz => 1 ],
16 [ 3, foo => {quux=>1}, undef, 4, bar => 0, 5, baz => 1 ],
17 );
18