]> git.vpit.fr Git - perl/modules/IPC-MorseSignals.git/blob - t/30-receiver-obj.t
a2e4f19c7a5792a8f566514e87bb5503d324c28e
[perl/modules/IPC-MorseSignals.git] / t / 30-receiver-obj.t
1 #!perl -T
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 4;
7
8 use IPC::MorseSignals::Receiver;
9
10 my $pants = new IPC::MorseSignals::Receiver \%SIG;
11 ok(defined $pants, 'IMR object is defined');
12 ok(ref $pants eq 'IPC::MorseSignals::Receiver', 'IMR object is valid');
13 ok($pants->isa('Bit::MorseSignals::Receiver'), 'IMR is a BMR');
14
15 my $fake = { };
16 bless $fake, 'IPC::MorseSignal::Hlagh';
17 eval { Bit::MorseSignals::Receiver::reset($fake) };
18 ok($@ && $@ =~ /^First\s+argument/, "BMR methods only apply to BMR objects");