mapserver/mapobjectdb/accessor_test.go
2019-06-13 08:04:32 +02:00

32 lines
434 B
Go

package mapobjectdb
import (
"fmt"
"mapserver/coords"
"testing"
)
func TestNewMapBlockCoords(t *testing.T) {
attrs := make(map[string]string)
attrs["X"] = "y"
pos := coords.NewMapBlockCoords(1, 2, 3)
fmt.Println(pos)
obj := NewMapObject(pos, 10, 12, 14, "xy")
fmt.Println(obj)
if obj.X != 26 {
t.Error("x coord off")
}
if obj.Y != 44 {
t.Error("Y coord off")
}
if obj.Z != 62 {
t.Error("Z coord off")
}
}