MCPcopy
hub / github.com/golang/protobuf / TestMarshalGolden

Function TestMarshalGolden

proto/text_test.go:188–199  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

186}
187
188func TestMarshalGolden(t *testing.T) {
189 for _, tt := range goldenMessages {
190 t.Run("", func(t *testing.T) {
191 if got, want := expandedMarshaler.Text(tt.m), tt.t; got != want {
192 t.Errorf("message %v: got:\n%s\nwant:\n%s", tt.m, got, want)
193 }
194 if got, want := expandedCompactMarshaler.Text(tt.m), tt.c; got != want {
195 t.Errorf("message %v: got:\n`%s`\nwant:\n`%s`", tt.m, got, want)
196 }
197 })
198 }
199}
200
201func TestUnmarshalGolden(t *testing.T) {
202 for _, tt := range goldenMessages {

Callers

nothing calls this directly

Calls 1

TextMethod · 0.80

Tested by

no test coverage detected