From 2d37aa73dc008a09fdcb734dd4c76508b4e203af Mon Sep 17 00:00:00 2001 From: Dan Kortschak Date: Fri, 23 Jul 2021 12:56:27 +0930 Subject: [PATCH] device/alsa: check error --- device/alsa/alsa_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/device/alsa/alsa_test.go b/device/alsa/alsa_test.go index ce413bc0..a53c27e7 100644 --- a/device/alsa/alsa_test.go +++ b/device/alsa/alsa_test.go @@ -70,6 +70,9 @@ func TestDevice(t *testing.T) { } cs := ai.DataSize() lexer, err := codecutil.NewByteLexer(cs) + if err != nil { + t.Fatalf("unexpected error creating byte lexer: %v", err) + } go lexer.Lex(ioutil.Discard, ai, time.Duration(c.RecPeriod*float64(time.Second))) time.Sleep(time.Duration(c.RecPeriod*float64(time.Second)) * time.Duration(n)) ai.Stop()