mirror of
https://github.com/jwetzell/psn-go.git
synced 2026-09-11 09:09:36 +00:00
change property name
This commit is contained in:
@@ -12,14 +12,14 @@ func TestInfoTrackerNameChunkEncoding(t *testing.T) {
|
|||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
description string
|
description string
|
||||||
expected []byte
|
expected []byte
|
||||||
chunk decoders.InfoTrackerNameChunkData
|
data decoders.InfoTrackerNameChunkData
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
description: "InfoTrackerNameChunk",
|
description: "InfoTrackerNameChunk",
|
||||||
expected: []byte{
|
expected: []byte{
|
||||||
0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
|
0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
|
||||||
},
|
},
|
||||||
chunk: decoders.InfoTrackerNameChunkData{
|
data: decoders.InfoTrackerNameChunkData{
|
||||||
TrackerName: "Tracker 1",
|
TrackerName: "Tracker 1",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -27,7 +27,7 @@ func TestInfoTrackerNameChunkEncoding(t *testing.T) {
|
|||||||
|
|
||||||
for _, testCase := range testCases {
|
for _, testCase := range testCases {
|
||||||
|
|
||||||
actual := EncodeInfoTrackerNameChunk(testCase.chunk.TrackerName)
|
actual := EncodeInfoTrackerNameChunk(testCase.data.TrackerName)
|
||||||
|
|
||||||
if !reflect.DeepEqual(actual, testCase.expected) {
|
if !reflect.DeepEqual(actual, testCase.expected) {
|
||||||
t.Errorf("Test '%s' failed to encode chunk properly", testCase.description)
|
t.Errorf("Test '%s' failed to encode chunk properly", testCase.description)
|
||||||
|
|||||||
Reference in New Issue
Block a user