import source from 1.3.40
[external/swig.git] / Examples / test-suite / perl5 / packageoption_runme.pl
1 #!/usr/bin/perl -w
2 use strict;
3 use Test::More tests => 4;
4
5 BEGIN { use_ok('packageoption_a'); }
6 BEGIN { use_ok('packageoption_b'); }
7
8 # Workaround for 
9 #   ok( not (expression) , "test description" );
10 # does not working in older versions of Perl, eg 5.004_04
11 sub ok_not ($;$) {
12     my($test, $name) = @_;
13     $test = not $test;
14     ok($test, $name);
15 }
16
17 my $a = CommonPackage::A->new();
18
19 isa_ok($a, 'CommonPackage::A');
20
21 my $b = CommonPackage::B->new();
22
23 isa_ok($b, 'CommonPackage::B');
24