codec/h265/lex_test.go: adapted test for changes to error lex can return

This commit is contained in:
Saxon 2020-01-17 16:41:12 +10:30
parent 399ecb8874
commit fdf393566a
1 changed files with 4 additions and 1 deletions

View File

@ -28,6 +28,7 @@ LICENSE
package h265 package h265
import ( import (
"errors"
"io" "io"
"testing" "testing"
) )
@ -247,7 +248,9 @@ func TestLex(t *testing.T) {
r := &rtpReader{packets: test.packets} r := &rtpReader{packets: test.packets}
d := &destination{} d := &destination{}
err := NewLexer(test.donl).Lex(d, r, 0) err := NewLexer(test.donl).Lex(d, r, 0)
if err != nil { switch {
case err == nil || errors.Is(err, io.EOF): // Do nothing
default:
t.Fatalf("error lexing: %v\n", err) t.Fatalf("error lexing: %v\n", err)
} }