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>
diff --git a/internal/encoding/wire/wire_test.go b/internal/encoding/wire/wire_test.go
index faf6526..01e4d34 100644
--- a/internal/encoding/wire/wire_test.go
+++ b/internal/encoding/wire/wire_test.go
@@ -343,17 +343,17 @@
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}},