PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/test-suite/perl5/packageoption_runme.pl

#
Perl | 24 lines | 13 code | 7 blank | 4 comment | 0 complexity | d18eac5129c2e53d1c82498a77c92282 MD5 | raw file
 1#!/usr/bin/perl -w
 2use strict;
 3use Test::More tests => 4;
 4
 5BEGIN { use_ok('packageoption_a'); }
 6BEGIN { 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
11sub ok_not ($;$) {
12    my($test, $name) = @_;
13    $test = not $test;
14    ok($test, $name);
15}
16
17my $a = CommonPackage::A->new();
18
19isa_ok($a, 'CommonPackage::A');
20
21my $b = CommonPackage::B->new();
22
23isa_ok($b, 'CommonPackage::B');
24