blob: aafdca347a62eb52a650fba4b87bfc5213d5c2f0 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package pktline_test
import (
"errors"
"strings"
"testing"
"lindenii.org/go/furgit/network/protocol/pktline"
)
func TestDecoderInvalid0003(t *testing.T) {
t.Parallel()
dec := pktline.NewDecoder(strings.NewReader("0003"), pktline.ReadOptions{})
_, err := dec.ReadFrame()
if _, ok := errors.AsType[*pktline.ProtocolError](err); !ok {
t.Fatalf("got err %v, want ProtocolError", err)
}
}
|