Skip to content

Commit edf8687

Browse files
committed
Little test refactor
1 parent d330e15 commit edf8687

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

decoder_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ func TestDecodeString(t *testing.T) {
3434

3535
func TestDecodeStringInt(t *testing.T) {
3636
type test struct {
37-
TestString string `bencode:"teststring"`
38-
TestInt uint64 `bencode:"testint"`
37+
Foo string `bencode:"foo"`
38+
Bar uint64 `bencode:"bar"`
3939
}
4040
have := &test{}
4141
want := &test{"test", 1234567890}
42-
input := []byte("d7:testinti1234567890e10:teststring4:teste")
42+
input := []byte("d3:bari1234567890e3:foo4:teste")
4343
Decode(input, have)
4444
if !reflect.DeepEqual(have, want) {
4545
t.Errorf("Struct not properly hidrated: wanted %v but have %v", want, have)

0 commit comments

Comments
 (0)