blob: c0a6c0fcd4ab9d83c1102b111dfb96e0ae6c390f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package planar
import (
"testing"
"github.com/paulmach/orb"
)
func TestLength(t *testing.T) {
for _, g := range orb.AllGeometries {
Length(g)
}
}
func TestLength_LineString(t *testing.T) {
ls := orb.LineString{{0, 0}, {0, 3}, {4, 3}}
if d := Length(ls); d != 7 {
t.Errorf("length got: %f != 7.0", d)
}
}
|