MCPcopy
hub / github.com/gofiber/fiber / TestMarshalUnmarshalredirectionMsg

Function TestMarshalUnmarshalredirectionMsg

redirect_msgp_test.go:12–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestMarshalUnmarshalredirectionMsg(t *testing.T) {
13 v := redirectionMsg{}
14 bts, err := v.MarshalMsg(nil)
15 if err != nil {
16 t.Fatal(err)
17 }
18 left, err := v.UnmarshalMsg(bts)
19 if err != nil {
20 t.Fatal(err)
21 }
22 if len(left) > 0 {
23 t.Errorf("%d bytes left over after UnmarshalMsg(): %q", len(left), left)
24 }
25
26 left, err = msgp.Skip(bts)
27 if err != nil {
28 t.Fatal(err)
29 }
30 if len(left) > 0 {
31 t.Errorf("%d bytes left over after Skip(): %q", len(left), left)
32 }
33}
34
35func BenchmarkMarshalMsgredirectionMsg(b *testing.B) {
36 v := redirectionMsg{}

Callers

nothing calls this directly

Calls 4

MarshalMsgMethod · 0.95
UnmarshalMsgMethod · 0.95
FatalMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…