From be60f99ca7b07b0d863360035d27df6c21c02804 Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Wed, 1 Aug 2018 17:16:57 -0700 Subject: [PATCH] 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 --- internal/encoding/wire/wire_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/encoding/wire/wire_test.go b/internal/encoding/wire/wire_test.go index faf6526c..01e4d346 100644 --- a/internal/encoding/wire/wire_test.go +++ b/internal/encoding/wire/wire_test.go @@ -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}},