MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / TestDynamicMessage_Encode

Function TestDynamicMessage_Encode

internal/proto/dynamic_test.go:51–61  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

49}
50
51func TestDynamicMessage_Encode(t *testing.T) {
52 input := DynamicMessage{
53 1: 2,
54 3: 4,
55 }
56 got := input.Encode()
57 expected := []byte{1 << 3, 2, 3 << 3, 4}
58 if !bytes.Equal(got, expected) {
59 t.Fatalf("expected %v but got %v", expected, got)
60 }
61}

Callers

nothing calls this directly

Calls 1

EncodeMethod · 0.95

Tested by

no test coverage detected