5 use Test::More tests => 2;
6 use ExtUtils::Typemaps;
9 my $map = ExtUtils::Typemaps->new();
10 $map->add_typemap(ctype => 'unsigned int', xstype => 'T_UV');
11 $map->add_inputmap(xstype => 'T_UV', code => ' $var = ($type)SvUV($arg);');
12 is($map->as_string(), <<'HERE', "Simple typemap (with input and code including leading whitespace) matches expectations");
18 $var = ($type)SvUV($arg);
24 my $map = ExtUtils::Typemaps->new();
25 $map->add_typemap(ctype => 'unsigned int', xstype => 'T_UV');
26 $map->add_inputmap(xstype => 'T_UV', code => " \$var =\n(\$type)\n SvUV(\$arg);");
27 is($map->as_string(), <<'HERE', "Simple typemap (with input and multi-line code) matches expectations");