Debian Codegraph @

t/ffi_platypus_lang_c.t

raw
1 use Test2::V0 -no_srand => 1;
2 use FFI::CheckLib;
3 use FFI::Platypus;
4
5 my $libtest = find_lib lib => 'test', symbol => 'f0', libpath => 't/ffi';
6
7 subtest C => sub {
8 my $ffi = FFI::Platypus->new;
9 $ffi->lib($libtest);
10
11 eval { $ffi->type('int') };
12 is $@, '', 'int is an okay type';
13 eval { $ffi->type('foo_t') };
14 isnt $@, '', 'foo_t is not an okay type';
15 note $@;
16 eval { $ffi->type('sint16') };
17 is $@, '', 'sint16 is an okay type';
18
19 is $ffi->find_symbol('UnMangled::Name(int i)'), undef, 'unable to find unmangled name';
20
21 };
22
23 done_testing;