We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d330e15 commit edf8687Copy full SHA for edf8687
1 file changed
decoder_test.go
@@ -34,12 +34,12 @@ func TestDecodeString(t *testing.T) {
34
35
func TestDecodeStringInt(t *testing.T) {
36
type test struct {
37
- TestString string `bencode:"teststring"`
38
- TestInt uint64 `bencode:"testint"`
+ Foo string `bencode:"foo"`
+ Bar uint64 `bencode:"bar"`
39
}
40
have := &test{}
41
want := &test{"test", 1234567890}
42
- input := []byte("d7:testinti1234567890e10:teststring4:teste")
+ input := []byte("d3:bari1234567890e3:foo4:teste")
43
Decode(input, have)
44
if !reflect.DeepEqual(have, want) {
45
t.Errorf("Struct not properly hidrated: wanted %v but have %v", want, have)
0 commit comments