Checkpoint
This commit is contained in:
160 files changed
+76293
-387
No files matched your search
@@ -0,0 +1,23 @@
|
||||
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)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user