From a1da3e6707dcd8836434da902593a901f7d8d8df Mon Sep 17 00:00:00 2001 From: Nathanael Wong Date: Tue, 9 Jan 2024 14:16:16 -0100 Subject: [PATCH] update tests! --- src/GeoRegions.jl | 2 +- src/isin/isingeoregion.jl | 6 +++--- test/runtests.jl | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/GeoRegions.jl b/src/GeoRegions.jl index 8ee73488..7830f290 100644 --- a/src/GeoRegions.jl +++ b/src/GeoRegions.jl @@ -26,7 +26,7 @@ export getLandSea, smooth, smooth!, smoothlsm, - Point2 + in, Point2 ## Abstract types """ diff --git a/src/isin/isingeoregion.jl b/src/isin/isingeoregion.jl index 231bf311..288634f9 100644 --- a/src/isin/isingeoregion.jl +++ b/src/isin/isingeoregion.jl @@ -24,7 +24,7 @@ Base.in( tlon :: Real = 0, tlat :: Real = 0, throw :: Bool = true -) = isinGeoRegion(point,geo,tlon,tlat,throw) +) = isinGeoRegion(point,geo,tlon=tlon,tlat=tlat,throw=throw) """ in( @@ -53,7 +53,7 @@ Base.in( polyG :: PolyRegion; domask :: Bool = false, throw :: Bool = true -) = isinGeoRegion(Child,polyG,domask,throw) +) = isinGeoRegion(Child,polyG,domask=domask,throw=throw) """ in( @@ -79,7 +79,7 @@ Base.in( Child :: GeoRegion, rectG :: RectRegion; throw :: Bool = true -) = isinGeoRegion(Child,rectG,throw) +) = isinGeoRegion(Child,rectG,throw=throw) """ isinGeoRegion( diff --git a/test/runtests.jl b/test/runtests.jl index 32c591f5..2ca3a188 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -8,8 +8,7 @@ using Test C = Point2(-45,-7.5) geo = GeoRegion("AR6_EAO") - @test A in geo - @test B in geo - @test !(C in geo) - @test filter(in(geo),[A,B,C]) == [A,B] + @test in(A,geo) + @test in(B,geo) + @test !in(C,geo,throw=false) end