mirror of https://bitbucket.org/ausocean/av.git
codec/h265/lex_test.go: adapted test for changes to error lex can return
This commit is contained in:
parent
399ecb8874
commit
fdf393566a
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue