This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
put signature ops in their own subtree.
[perl5.git] / ext / XS-APItest / t / subsignature.t
CommitLineData
996b0cb8
PLE
1use warnings;
2use strict;
3
4use Test::More;
5
6BEGIN { $^H |= 0x20000; }
7
8my @t;
9
10@t = ();
11eval q{
12 use experimental 'signatures';
13 use XS::APItest qw(subsignature);
14 push @t, (subsignature $x, $y);
15 push @t, (subsignature $z, $);
16 push @t, (subsignature @rest);
17 push @t, (subsignature %rest);
18 push @t, (subsignature $one = 1);
19};
20is $@, "";
4df85778 21use Data::Dumper; print Dumper \@t;
996b0cb8
PLE
22is_deeply \@t, [
23 ['nextstate:4', 'argcheck:2:0:-', 'argelem:$x', 'argelem:$y'],
24 ['nextstate:5', 'argcheck:2:0:-', 'argelem:$z',],
25 ['nextstate:6', 'argcheck:0:0:@', 'argelem:@rest'],
26 ['nextstate:7', 'argcheck:0:0:%', 'argelem:%rest'],
27 ['nextstate:8', 'argcheck:1:1:-', 'argelem:$one:d'],
28];
29
30done_testing;