mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-06-16 04:25:23 +00:00
tbl: lintfix
This commit is contained in:
parent
e163c40107
commit
3b8cdffe15
|
@ -230,7 +230,7 @@ func (td *TextDictionary) Marshal() []byte {
|
||||||
sw.PushUint16(uint16(len(value) + 1))
|
sw.PushUint16(uint16(len(value) + 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
// data stream: put all data in appropiate order
|
// data stream: put all data in appropriate order
|
||||||
for key, value := range *td {
|
for key, value := range *td {
|
||||||
for _, i := range key {
|
for _, i := range key {
|
||||||
sw.PushBytes(byte(i))
|
sw.PushBytes(byte(i))
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package d2tbl
|
package d2tbl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -27,10 +25,11 @@ func TestTBL_Marshal(t *testing.T) {
|
||||||
|
|
||||||
for key, value := range *tbl {
|
for key, value := range *tbl {
|
||||||
newValue, ok := newTbl[key]
|
newValue, ok := newTbl[key]
|
||||||
fmt.Println(newValue, value)
|
|
||||||
if !ok {
|
if !ok {
|
||||||
t.Fatal("string wasn't encoded to table")
|
t.Fatal("string wasn't encoded to table")
|
||||||
}
|
}
|
||||||
|
|
||||||
if newValue != value {
|
if newValue != value {
|
||||||
t.Fatal("unexpected value set")
|
t.Fatal("unexpected value set")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user