From fdf393566a61fdfa6a6f64aadf290e77e3c6b9f4 Mon Sep 17 00:00:00 2001 From: Saxon Date: Fri, 17 Jan 2020 16:41:12 +1030 Subject: [PATCH] codec/h265/lex_test.go: adapted test for changes to error lex can return --- codec/h265/lex_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/codec/h265/lex_test.go b/codec/h265/lex_test.go index 1a409e4c..4ed57c12 100644 --- a/codec/h265/lex_test.go +++ b/codec/h265/lex_test.go @@ -28,6 +28,7 @@ LICENSE package h265 import ( + "errors" "io" "testing" ) @@ -247,7 +248,9 @@ func TestLex(t *testing.T) { r := &rtpReader{packets: test.packets} d := &destination{} 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) }