Clang
view release on metacpan or search on metacpan
t/05-typekind.t view on Meta::CPAN
#!perl -T
use Test::More;
use Clang;
my $index = Clang::Index -> new(0);
my $tunit = $index -> parse('t/fragments/test.c');
my $cursr = $tunit -> cursor;
is($cursr -> type -> kind -> spelling, 'Invalid');
my $cursors = $cursr -> children;
my @spellings = map { $_ -> type -> kind -> spelling } @$cursors;
my @expected = qw(
FunctionProto
FunctionProto
);
is_deeply(\@spellings, \@expected);
done_testing;
( run in 1.215 second using v1.01-cache-2.11-cpan-5837b0d9d2c )