This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ParseXS - better support for duplicate ALIASes
[perl5.git] / dist / ExtUtils-ParseXS / t / 103-tidy_type.t
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4 use Test::More;
5 use ExtUtils::Typemaps;
6
7 my @tests = (
8   [' *  ** ', '***'],
9   [' *     ** ', '***'],
10   [' *     ** foobar  *   ', '*** foobar *'],
11   ['unsigned int', 'unsigned int'],
12   ['std::vector<int>', 'std::vector<int>'],
13   ['std::vector< unsigned int >', 'std::vector<unsigned int>'],
14   ['std::vector< vector<unsigned int> >', 'std::vector<vector<unsigned int> >'],
15   ['std::map< map <unsigned int, int>, int>', 'std::map<map<unsigned int, int>, int>'],
16 );
17
18 plan tests => scalar(@tests);
19
20 foreach my $test (@tests) {
21   is(ExtUtils::Typemaps::tidy_type($test->[0]), $test->[1], "Tidying '$test->[0]'");
22 }
23