Permalink
Browse files

add feature count test

  • Loading branch information...
yeesian authored and visr committed Nov 4, 2018
1 parent d24249d commit 378f8d1b9ca8992d815aac3ea72196a7a68e790f
Showing with 4 additions and 0 deletions.
  1. +4 −0 test/test_gdal_tutorials.jl
@@ -110,11 +110,13 @@ AG.registerdrivers() do
end
featuredefn = AG.getlayerdefn(layer)
@test AG.getname(featuredefn) == "point_out"
@test AG.nfeature(layer) == 0
AG.createfeature(featuredefn) do feature
AG.setfield!(feature, AG.getfieldindex(feature, "Name"), "myname")
AG.setgeomdirectly!(feature, AG.unsafe_createpoint(100.123, 0.123))
AG.createfeature!(layer, feature)
end
@test AG.nfeature(layer) == 1
end

rm("$pointshapefile.dbf")
@@ -132,10 +134,12 @@ AG.registerdrivers() do
end
featuredefn = AG.getlayerdefn(layer)
@test AG.getname(featuredefn) == "point_out"
@test AG.nfeature(layer) == 0
AG.createfeature(layer) do feature
AG.setfield!(feature, AG.getfieldindex(feature, "Name"), "myname")
AG.setgeomdirectly!(feature, AG.unsafe_createpoint(100.123, 0.123))
end
@test AG.nfeature(layer) == 1
end

rm("$pointshapefile.dbf")

0 comments on commit 378f8d1

Please sign in to comment.