audio/internal/convert: split some tests

This commit is contained in:
Hajime Hoshi 2024-07-21 11:36:46 +09:00
parent f6c9c88f78
commit f36ea4125d

View File

@ -61,9 +61,10 @@ func TestStereoF32(t *testing.T) {
} }
for _, tc := range testCases { for _, tc := range testCases {
tc := tc tc := tc
t.Run(tc.Name, func(t *testing.T) {
for _, mono := range []bool{false, true} { for _, mono := range []bool{false, true} {
mono := mono mono := mono
t.Run(fmt.Sprintf("%s (mono=%t)", tc.Name, mono), func(t *testing.T) { t.Run(fmt.Sprintf("mono=%t", mono), func(t *testing.T) {
var inBytes, outBytes []byte var inBytes, outBytes []byte
for _, v := range tc.In { for _, v := range tc.In {
b := math.Float32bits(v) b := math.Float32bits(v)
@ -103,5 +104,6 @@ func TestStereoF32(t *testing.T) {
} }
}) })
} }
})
} }
} }