Skip to content

Commit

Permalink
Adding some more basic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
natgeo-wong committed Jan 10, 2024
1 parent a1da3e6 commit 51fe470
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
using GeoRegions
using Test

@testset "GeoRegions.jl" begin
@testset "Test that all predefined GeoRegions work" begin

# Test all predefined GeoRegions
geov,_,_ = listGeoRegions()
for geo in geov
@test isGeoRegion(geo);
end

end

@testset "Test Creation, Detection and Removal of GeoRegions" begin

@test !isGeoRegion("TRP",throw=false)
geo = RectRegion("TRP","GLB","Tropics",[30,-30,360,0])
geo = RectRegion("TRP_DTP","GLB","Tropics",[10,-10,360,0])
@test isGeoRegion("TRP",throw=false)
removeGeoRegion("TRP")
@test isGeoRegion("TRP_DTP",throw=false)
removeGeoRegion("TRP_DTP")
@test !isGeoRegion("TRP_DTP",throw=false)

end

@testset "Testing isPointinGeoRegion" begin
# Test in operator
A = Point2(-20,5)
B = Point2(340,5)
Expand Down

0 comments on commit 51fe470

Please sign in to comment.