tile38/internal/object/object_test.go

19 lines
399 B
Go
Raw Normal View History

2022-09-21 00:20:53 +03:00
package object
import (
"testing"
"github.com/tidwall/assert"
"github.com/tidwall/geojson"
"github.com/tidwall/geojson/geometry"
"github.com/tidwall/tile38/internal/field"
)
func P(x, y float64) geojson.Object {
return geojson.NewSimplePoint(geometry.Point{X: 10, Y: 20})
}
func TestObject(t *testing.T) {
2022-09-21 20:03:53 +03:00
o := New("hello", P(10, 20), 99, field.List{})
2022-09-21 00:20:53 +03:00
assert.Assert(o.ID() == "hello")
}