mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-16 17:35:57 -05:00
ff4f0b0bfa
Typos located using misspell: https://github.com/client9/misspell Formatting done using goimports: https://godoc.org/golang.org/x/tools/cmd/goimports
26 lines
569 B
Go
26 lines
569 B
Go
package d2dt1
|
|
|
|
import (
|
|
"testing"
|
|
|
|
testify "github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestNewSubTile(t *testing.T) {
|
|
assert := testify.New(t)
|
|
data := []byte{1, 2, 4, 8, 16, 32, 64, 128}
|
|
|
|
for i, b := range data {
|
|
tile := NewSubTileFlags(b)
|
|
assert.Equal(i == 0, tile.BlockWalk)
|
|
assert.Equal(i == 1, tile.BlockLOS)
|
|
assert.Equal(i == 2, tile.BlockJump)
|
|
assert.Equal(i == 3, tile.BlockPlayerWalk)
|
|
assert.Equal(i == 4, tile.Unknown1)
|
|
assert.Equal(i == 5, tile.BlockLight)
|
|
assert.Equal(i == 6, tile.Unknown2)
|
|
assert.Equal(i == 7, tile.Unknown3)
|
|
}
|
|
|
|
}
|