package audio import "testing" func TestFormatBitsPerSample(t *testing.T) { testCases := []struct { Test Format Want int }{ {Int8, 8}, {Int16, 16}, {Int16BE, 16}, {Int32, 32}, {Int32BE, 32}, } for _, test := range testCases { t.Run(test.Test.(pcmFormat).String(), func(it *testing.T) { if v := test.Test.BitsPerSample(); v != test.Want { it.Errorf("expected %d bits per sample, got %d", test.Want, v) } }) } }