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))
|
||||
}
|
||||
|
||||
// data stream: put all data in appropiate order
|
||||
// data stream: put all data in appropriate order
|
||||
for key, value := range *td {
|
||||
for _, i := range key {
|
||||
sw.PushBytes(byte(i))
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package d2tbl
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
@ -27,10 +25,11 @@ func TestTBL_Marshal(t *testing.T) {
|
|||
|
||||
for key, value := range *tbl {
|
||||
newValue, ok := newTbl[key]
|
||||
fmt.Println(newValue, value)
|
||||
|
||||
if !ok {
|
||||
t.Fatal("string wasn't encoded to table")
|
||||
}
|
||||
|
||||
if newValue != value {
|
||||
t.Fatal("unexpected value set")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue