|
1 | 1 | @testset "Basic types" begin |
2 | 2 | point = Point(2, 3) |
3 | | - testgeometry(point) |
| 3 | + @test testgeometry(point) |
4 | 4 | @test ncoord(point) == 2 |
5 | 5 | @test getcoord(point, 2) == 3 |
6 | 6 | @test GeoInterface.coordinates(point) == [2, 3] |
7 | 7 |
|
8 | 8 | mp = MultiPoint([point, point]) |
9 | | - testgeometry(mp) |
| 9 | + @test testgeometry(mp) |
10 | 10 | @test ngeom(mp) == 2 |
11 | 11 | @test getgeom(mp, 2) == point |
12 | 12 | @test GeoInterface.coordinates(mp) == [[2, 3], [2, 3]] |
13 | 13 |
|
14 | 14 | linestring = LineString(Point{2,Int}[(10, 10), (20, 20), (10, 40)]) |
15 | | - testgeometry(linestring) |
| 15 | + @test testgeometry(linestring) |
16 | 16 | @test ngeom(linestring) == 3 |
17 | 17 | @test getgeom(linestring, 1) == Point(10, 10) |
18 | 18 | @test getgeom(linestring, 2) == Point(20, 20) |
19 | 19 | @test getgeom(linestring, 3) == Point(10, 40) |
20 | 20 | @test GeoInterface.coordinates(linestring) == [[10, 10], [20, 20], [10, 40]] |
21 | 21 |
|
22 | 22 | multilinestring = MultiLineString([linestring, linestring]) |
23 | | - testgeometry(multilinestring) |
| 23 | + @test testgeometry(multilinestring) |
24 | 24 | @test GeoInterface.coordinates(multilinestring) == |
25 | 25 | [[[10, 10], [20, 20], [10, 40]], [[10, 10], [20, 20], [10, 40]]] |
26 | 26 |
|
27 | 27 | poly = Polygon(rand(Point{2,Float32}, 5), [rand(Point{2,Float32}, 5)]) |
28 | | - testgeometry(poly) |
| 28 | + @test testgeometry(poly) |
29 | 29 | @test length(GeoInterface.coordinates(poly)) == 2 |
30 | 30 | @test length(GeoInterface.coordinates(poly)[1]) == 5 |
31 | 31 |
|
32 | 32 | triangle = Triangle(point, point, point) |
33 | | - testgeometry(triangle) |
| 33 | + @test testgeometry(triangle) |
34 | 34 | @test length(GeoInterface.coordinates(triangle)) == 1 |
35 | 35 | @test length(GeoInterface.coordinates(triangle)[1]) == 3 |
36 | 36 |
|
37 | 37 | polys = MultiPolygon([poly, poly]) |
38 | | - testgeometry(polys) |
| 38 | + @test testgeometry(polys) |
39 | 39 | @test length(GeoInterface.coordinates(polys)) == 2 |
40 | 40 | @test length(GeoInterface.coordinates(polys)[1]) == 2 |
41 | 41 | @test length(GeoInterface.coordinates(polys)[1][1]) == 5 |
42 | 42 | end |
43 | 43 |
|
44 | 44 | @testset "Mesh" begin |
45 | 45 | mesh = triangle_mesh(Sphere(Point3f(0), 1)) |
46 | | - testgeometry(mesh) |
| 46 | + @test testgeometry(mesh) |
47 | 47 | end |
0 commit comments