aboutsummaryrefslogtreecommitdiff
path: root/bencode/bencode_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'bencode/bencode_test.go')
-rw-r--r--bencode/bencode_test.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/bencode/bencode_test.go b/bencode/bencode_test.go
index 84fda69..8fb6856 100644
--- a/bencode/bencode_test.go
+++ b/bencode/bencode_test.go
@@ -69,6 +69,7 @@ var testCase = []struct {
func TestUnmarshal(t *testing.T) {
for _, tc := range testCase {
+ t.Log("Testing", tc.Torrent)
var tor meta.Torrent
body, err := ioutil.ReadFile(tc.Torrent)
if err != nil {
@@ -85,9 +86,13 @@ func TestUnmarshal(t *testing.T) {
}
}
-func testUnmarshalPartial(t *testing.T) {
+func TestUnmarshalPartial(t *testing.T) {
for _, tc := range testCase {
- var tor = struct{ Announce string }{}
+ t.Log("Testing", tc.Torrent)
+ var tor = struct {
+ Announce string `bencode:"announce"`
+ //Announce string
+ }{}
body, err := ioutil.ReadFile(tc.Torrent)
if err != nil {
t.Error(err)
@@ -96,6 +101,7 @@ func testUnmarshalPartial(t *testing.T) {
if err != nil {
t.Error(err)
}
+ t.Log(tor.Announce)
}
}