MCPcopy Create free account
hub / github.com/OpenPrinting/goipp / TestEncodeDecode

Function TestEncodeDecode

encdec_test.go:173–182  ·  view source on GitHub ↗

Test Message Encode, then Decode

(t *testing.T)

Source from the content-addressed store, hash-verified

171
172// Test Message Encode, then Decode
173func TestEncodeDecode(t *testing.T) {
174 m1 := testEncodeDecodeMessage()
175
176 data, err := m1.EncodeBytes()
177 assertNoError(t, err)
178
179 m2 := &Message{}
180 err = m2.DecodeBytes(data)
181 assertNoError(t, err)
182}
183
184// Test encode errors
185func TestEncodeErrors(t *testing.T) {

Callers

nothing calls this directly

Calls 4

DecodeBytesMethod · 0.95
testEncodeDecodeMessageFunction · 0.85
assertNoErrorFunction · 0.85
EncodeBytesMethod · 0.80

Tested by

no test coverage detected