Skip to content

Commit

Permalink
Improve test_samples_are_identical
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmacphersonmusic committed May 21, 2015
1 parent 972d693 commit 1dadb28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/note_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ def setup
@distorted_note = MusicTheory::Note.new(distort: true)
end

DIFF_THRESHOLD = 1.0e-12

def test_samples_are_identical
assert sample_arrays_diff(@test_samples, @basic_note.samples) < (0.1 * (10 ** -10))
assert sample_arrays_diff(@test_samples, @basic_note.samples) < DIFF_THRESHOLD
end

def test_number_of_samples_match
Expand Down

0 comments on commit 1dadb28

Please sign in to comment.