Skip to content

Commit

Permalink
Add apply_key_signature tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
LastOfTheCarelessMen committed Jan 6, 2010
1 parent fe6fa09 commit cedd993
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions t/02-key.t
Expand Up @@ -61,4 +61,18 @@ plan *;
is %key<B>, "^", "B is sharp";
}

{
my %key = key_signature("C#m");
is apply_key_signature(%key, ("f" ~~ m/ <ABC::pitch> /).<ABC::pitch>), "^f", "f => ^f";
is apply_key_signature(%key, ("C" ~~ m/ <ABC::pitch> /).<ABC::pitch>), "^C", "C => ^C";
is apply_key_signature(%key, ("G" ~~ m/ <ABC::pitch> /).<ABC::pitch>), "^G", "G => ^G";
is apply_key_signature(%key, ("d" ~~ m/ <ABC::pitch> /).<ABC::pitch>), "^d", "d => ^d";
is apply_key_signature(%key, ("_f" ~~ m/ <ABC::pitch> /).<ABC::pitch>), "_f", "_f => _f";
is apply_key_signature(%key, ("=C" ~~ m/ <ABC::pitch> /).<ABC::pitch>), "=C", "=C => =C";
is apply_key_signature(%key, ("^G" ~~ m/ <ABC::pitch> /).<ABC::pitch>), "^G", "^G => ^G";
is apply_key_signature(%key, ("^^d" ~~ m/ <ABC::pitch> /).<ABC::pitch>), "^^d", "^^d => ^^d";
is apply_key_signature(%key, ("b'" ~~ m/ <ABC::pitch> /).<ABC::pitch>), "b'", "b' => b'";
}


done_testing;

0 comments on commit cedd993

Please sign in to comment.