diff --git a/test/runtests.jl b/test/runtests.jl index d7e94014..930c2af8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,19 +1,10 @@ using GeoRegions +using Logging using Test -@testset "Test that all predefined GeoRegions work" begin - - # Test all predefined GeoRegions - IDvec,_,_ = GeoRegions.listall() - for ID in IDvec - @test isID(ID,throw=false); - @test isGeoRegion(GeoRegion(ID),throw=false); - end - -end - @testset "Test Creation, Detection and Removal of GeoRegions" begin + disable_logging(Logging.Warn) @test !isID("TRP",throw=false) geo1 = RectRegion("TRP","GLB","Tropics",[30,-30,360,0]) geo2 = RectRegion("TRP_DTP","GLB","Deep Tropics",[10,-10,360,0]) @@ -30,11 +21,13 @@ end @test add(geo) === nothing @test isGeoRegion(geo,throw=false) rm(geo) + disable_logging(Logging.Debug) end @testset "Testing Directory Specification for Custom GeoRegions" begin + disable_logging(Logging.Warn) @test !isID("TRP",path=pwd(),throw=false) geo1 = RectRegion("TRP","GLB","Tropics",[30,-30,360,0],path=pwd()) @test !isID("TRP",throw=false) @@ -44,10 +37,13 @@ end @test_throws "not a valid GeoRegion identifier" rm(geo1,path=homedir()) @test rm(geo1) === nothing @test !isGeoRegion(geo1,throw=false) + disable_logging(Logging.Debug) end @testset "Testing isPointinGeoRegion" begin + + disable_logging(Logging.Warn) # Test in operator A = Point2(-20,5) B = Point2(340,5) @@ -57,4 +53,18 @@ end @test in(A,geo) @test in(B,geo) @test !in(C,geo) + disable_logging(Logging.Debug) + +end + +@testset "Test that all predefined GeoRegions work" begin + + disable_logging(Logging.Warn) + IDvec,_,_ = GeoRegions.listall() + for ID in IDvec + @test isID(ID,throw=false); + @test isGeoRegion(GeoRegion(ID),throw=false); + end + disable_logging(Logging.Debug) + end