Skip to content

Commit

Permalink
Need to return false
Browse files Browse the repository at this point in the history
  • Loading branch information
natgeo-wong committed Sep 6, 2024
1 parent d9f785d commit 5c006e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/georegions/is.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ function isGeoRegion(
end
end

else

return false

end

end
Expand Down
10 changes: 5 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ end
geo2 = RectRegion("TRP_DTP","GLB","Deep Tropics",[10,-10,360,0])
@test isID("TRP",throw=false)
@test isGeoRegion(geo1,throw=false)
@test rm(geo1)
@test rm(geo1) === nothing
@test !isGeoRegion(geo1,throw=false)
@test isGeoRegion(geo2,throw=false)
@test rmID("TRP_DTP")
@test rmID("TRP_DTP") === nothing
@test !isGeoRegion(geo2,throw=false)

geo = RectRegion("TRP","GLB","Tropics",[30,-30,360,0],save=false)
@test !isGeoRegion(geo,throw=false)
@test add(geo)
@test add(geo) === nothing
@test isGeoRegion(geo,throw=false)
rm(geo)

Expand All @@ -41,8 +41,8 @@ end
@test isID("TRP",path=pwd(),throw=false)
@test isGeoRegion(geo1,throw=false)
@test !isGeoRegion(geo1,path=homedir(),throw=false)
@test !rm(geo1,path=homedir())
@test rm(geo1)
@test ! (rm(geo1,path=homedir()) === nothing)
@test rm(geo1) === nothing
@test !isGeoRegion(geo1,throw=false)

end
Expand Down

0 comments on commit 5c006e3

Please sign in to comment.