diff --git a/test/runtests.jl b/test/runtests.jl index 2ca3a188..10e2ce42 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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,0,360]) + geo = RectRegion("TRP_DTP","GLB","Tropics",[10,-10,0,360]) + @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)