Skip to content

Commit

Permalink
Add test to verify amplitude range
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmacphersonmusic committed May 19, 2015
1 parent 1c25e9e commit f1adf31
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/note_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,16 @@ def test_number_of_frames_matches_number_of_samples
assert_equal @note_220.total_frames, @note_220.samples.length
assert_equal @distorted_note.total_frames, @distorted_note.samples.length
end

def test_amplitude_range
@basic_note.samples.each do |sample|
assert sample.abs <= 1
end
@note_220.samples.each do |sample|
assert sample.abs <= 1
end
@distorted_note.samples.each do |sample|
assert sample.abs <= 1
end
end
end

0 comments on commit f1adf31

Please sign in to comment.