Skip to content

Commit

Permalink
update tests!
Browse files Browse the repository at this point in the history
  • Loading branch information
natgeo-wong committed Jan 9, 2024
1 parent 7b47a0a commit a1da3e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/GeoRegions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export

getLandSea, smooth, smooth!, smoothlsm,

Point2
in, Point2

## Abstract types
"""
Expand Down
6 changes: 3 additions & 3 deletions src/isin/isingeoregion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand All @@ -79,7 +79,7 @@ Base.in(
Child :: GeoRegion,
rectG :: RectRegion;
throw :: Bool = true
) = isinGeoRegion(Child,rectG,throw)
) = isinGeoRegion(Child,rectG,throw=throw)

"""
isinGeoRegion(
Expand Down
7 changes: 3 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a1da3e6

Please sign in to comment.