Some checks failed
CodeQL / Analyze (go) (push) Successful in 6m28s
Docker Image / build-docker (push) Failing after 13m26s
Lint and Testing / lint (push) Successful in 11m17s
Lint and Testing / test (push) Successful in 11m17s
Lint and Testing / golangci (push) Successful in 2m40s
21 lines
426 B
Go
21 lines
426 B
Go
package transcode
|
|
|
|
import "testing"
|
|
|
|
func TestWhisperOptions(t *testing.T) {
|
|
o := WhisperOptions()
|
|
if err := o.Validate(); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if o.SampleRate != 16000 || o.Channels != 1 {
|
|
t.Fatalf("unexpected whisper opts: %+v", o)
|
|
}
|
|
}
|
|
|
|
func TestResolveFormat_unknown(t *testing.T) {
|
|
_, err := ResolveFormat("xyz")
|
|
if err == nil {
|
|
t.Fatal("expected error")
|
|
}
|
|
}
|