Fixed tests for proper counts

This commit is contained in:
DataHoarder 2022-02-26 15:44:53 +01:00
parent b3f6b509f4
commit ed7bb2d16a

View file

@ -72,6 +72,7 @@ func TestMP3Decode(t *testing.T) {
}
func TestHasher24(t *testing.T) {
t.Parallel()
fp, err := os.Open(TestSingleSample24)
if err != nil {
@ -108,6 +109,7 @@ func TestHasher24(t *testing.T) {
}
func TestHasher16(t *testing.T) {
t.Parallel()
fp, err := os.Open(TestSingleSample16)
if err != nil {
@ -193,12 +195,13 @@ func TestFilterChain(t *testing.T) {
if result.Channels != 2 {
t.Errorf("Wrong Channel Count %d != %d", result.SampleRate, 2)
}
if sink.SamplesRead != 437731779 {
t.Errorf("Wrong Sample Count %d != %d", sink.SamplesRead, 437731779)
if sink.SamplesRead != 6284999 {
t.Errorf("Wrong Sample Count %d != %d", sink.SamplesRead, 6284999)
}
}
func TestQueue(t *testing.T) {
t.Parallel()
const sampleRate = 41000
@ -256,7 +259,7 @@ func TestQueue(t *testing.T) {
if result.Channels != 2 {
t.Errorf("Wrong Channel Count %d != %d", result.SampleRate, 2)
}
if sink.SamplesRead != 218834361 {
t.Errorf("Wrong Sample Count %d != %d", sink.SamplesRead, 218834361)
if sink.SamplesRead != 437731779 {
t.Errorf("Wrong Sample Count %d != %d", sink.SamplesRead, 437731779)
}
}