6 use Test::More tests => 10;
10 my $brd = B::RecDeparse->new;
11 ok(defined $brd, 'BRD object is defined');
12 is(ref $brd, 'B::RecDeparse', 'BRD object is valid');
13 ok($brd->isa('B::Deparse'), 'BRD is a BD');
16 ok(defined $brd2, 'BRD::new called as an object method works' );
17 is(ref $brd2, 'B::RecDeparse', 'BRD::new called as an object method works is valid');
18 ok($brd2->isa('B::Deparse'), 'BRD is a BD');
20 my $brd3 = B::RecDeparse::new();
21 ok(defined $brd3, 'BRD::new called as a function works ');
22 is(ref $brd3, 'B::RecDeparse', 'BRD::new called as a functions returns a B::RecDeparse object');
23 ok($brd3->isa('B::Deparse'), 'BRD is a BD');
25 eval { $brd2 = B::RecDeparse->new(qw<a b c>) };
26 like($@, qr/Optional\s+arguments/, 'BRD::new gets parameters as key => value pairs');