Exemplo n.º 1
0
func TestNewLinearRingFromLine(t *testing.T) {
	c := coords64.NewCoords64FromSlice(2, []float64{1, 1, 5, 5, 1, 1})
	geom.NewLinearRingFromCoords(c)
}
Exemplo n.º 2
0
func TestNewLinearRingInsufficientCoords(t *testing.T) {
	c := coords64.NewCoords64FromSlice(2, []float64{1, 1, 2, 2})
	assert.Panics(t, func() { geom.NewLinearRingFromCoords(c) })
}
Exemplo n.º 3
0
func TestNewLinearRingEndPointMismatchLine(t *testing.T) {
	c := coords64.NewCoords64FromSlice(2, []float64{1, 1, 2, 2, 3, 3})
	assert.Panics(t, func() { geom.NewLinearRingFromCoords(c) })
}