File Coverage

blib/lib/POE/Framework/MIDI/Musician/Test.pm
Criterion Covered Total %
statement 21 33 63.6
branch n/a
condition n/a
subroutine 7 9 77.7
pod 0 2 0.0
total 28 44 63.6


line stmt bran cond sub pod time code
1             # $Id: Test.pm,v 1.1.1.1 2004/11/22 17:52:11 root Exp $
2            
3             package POE::Framework::MIDI::Musician::Test;
4 1     1   1326 use strict;
  1         3  
  1         32  
5 1     1   6 use vars '$VERSION'; $VERSION = '0.02';
  1         1  
  1         41  
6 1     1   5 use vars '@ISA';
  1         2  
  1         69  
7             @ISA = 'POE::Framework::MIDI::Musician';
8            
9 1     1   6 use POE::Framework::MIDI::Musician;
  1         2  
  1         25  
10 1     1   6 use POE::Framework::MIDI::Bar;
  1         1  
  1         18  
11 1     1   6 use POE::Framework::MIDI::Note;
  1         2  
  1         23  
12 1     1   4 use POE::Framework::MIDI::Rest;
  1         2  
  1         190  
13            
14             sub new {
15 0     0 0   my ($self, $class) = ({},shift);
16 0           $self->{cfg} = shift;
17 0           bless $self, $class;
18 0           return $self;
19             }
20            
21             sub make_bar {
22 0     0 0   my $self = shift;
23 0           my $barnum = shift;
24            
25             # make a bar
26 0           my $bar = POE::Framework::MIDI::Bar->new({ number => $barnum });
27             # add some notes & rests
28 0           my $note1 = POE::Framework::MIDI::Note->new({ name => 'C', duration => 'sn' });
29 0           my $note2 = POE::Framework::MIDI::Note->new({ name => 'D', duration => 'en' });
30 0           my $rest1 = POE::Framework::MIDI::Rest->new({ duration => 'qn' });
31            
32 0           $bar->add_events($note1, $rest1, $note1, $note2);
33            
34             # can't really test Noops yet - not supported.
35            
36             #lib/POE/Framework/MIDI/Phrase;
37             #lib/POE/Framework/MIDI/Ruleset;
38             #lib/POE/Framework/MIDI/Rule;
39             #lib/POE/Framework/MIDI/Utility;
40             #lib/POE/Framework/MIDI/Key;
41             #lib/POE/Framework/MIDI/Note;
42             #lib/POE/Framework/MIDI/Rest;
43             #lib/POE/Framework/MIDI/Noop;
44            
45 0           return $bar;
46             }
47            
48             1;
49            
50             __END__