import source from 1.3.40
[external/swig.git] / Examples / test-suite / perl5 / typename_runme.pl
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4 use Test::More tests => 4;
5 BEGIN { use_ok('typename') }
6 require_ok('typename');
7
8 # adapted from ../python/typename_runme.py
9
10 my $f = typename::Foo->new();
11 my $b = typename::Bar->new();
12 my $x = typename::twoFoo($f);
13 is($x, 4.3656);
14 my $y = typename::twoBar($b);
15 is($y, 84);
16 # I would like this test better if I could pass in a float to the
17 # integer test and see it lose precision.