1
0
forked from MTSR/mapserver
mapserver/server/mapobjectdb/accessor_test.go

34 lines
453 B
Go
Raw Normal View History

2019-02-06 10:09:21 +03:00
package mapobjectdb
import (
"mapserver/coords"
"testing"
"fmt"
)
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")
}
}