mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2024-12-29 12:17:48 +00:00
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:
parent
9834a7df51
commit
be60f99ca7
@ -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}},
|
||||
|
Loading…
Reference in New Issue
Block a user