internal/encoding/wire: fix minor miscategorization in test

Some of the test cases in TestFixed64 actually belong in TestBytes.

Change-Id: I7f3efd77662881b64a96311161440fd220ae8074
Reviewed-on: https://go-review.googlesource.com/127456
Reviewed-by: Chris Manghane <cmang@golang.org>
This commit is contained in:
Joe Tsai 2018-08-01 17:16:57 -07:00 committed by Joe Tsai
parent 9834a7df51
commit be60f99ca7

View File

@ -343,17 +343,17 @@ func TestFixed64(t *testing.T) {
appendOps: ops{appendFixed64{0xf0e1d2c3b4a59687}},
wantRaw: dhex("8796a5b4c3d2e1f0"),
consumeOps: ops{consumeFixed64{wantVal: 0xf0e1d2c3b4a59687, wantCnt: 8}},
}, {
appendOps: ops{appendRaw(dhex(""))},
consumeOps: ops{consumeBytes{wantErr: io.ErrUnexpectedEOF}},
}, {
appendOps: ops{appendRaw(dhex("01"))},
consumeOps: ops{consumeBytes{wantErr: io.ErrUnexpectedEOF}},
}})
}
func TestBytes(t *testing.T) {
runTests(t, []testOps{{
appendOps: ops{appendRaw(dhex(""))},
consumeOps: ops{consumeBytes{wantErr: io.ErrUnexpectedEOF}},
}, {
appendOps: ops{appendRaw(dhex("01"))},
consumeOps: ops{consumeBytes{wantErr: io.ErrUnexpectedEOF}},
}, {
appendOps: ops{appendVarint{0}, appendRaw("")},
wantRaw: dhex("00"),
consumeOps: ops{consumeBytes{wantVal: dhex(""), wantCnt: 1}},